function parseMultilingualBook(book) {
    var languages = book.getLanguages();
    var langList = languages.getList();

    return Promise.reduce(langList, function(currentBook, lang) {
        var langID = lang.getID();
        var child = Book.createFromParent(currentBook, langID);
        var ignore = currentBook.getIgnore();

        return Promise(child)
        .then(parseConfig)
        .then(parseBookContent)
        .then(function(result) {
            // Ignore content of this book when generating parent book
            ignore = ignore.add(langID + '/**');
            currentBook = currentBook.set('ignore', ignore);

            return currentBook.addLanguageBook(langID, result);
        });
    }, book);
}
function parseMultilingualBook(book) {
    var languages = book.getLanguages();
    var langList = languages.getList();

    return Promise.reduce(langList, function(currentBook, lang) {
        var langID = lang.getID();
        var child = Book.createFromParent(currentBook, langID);
        var ignore = currentBook.getIgnore();

        return Promise(child)
        .then(parseConfig)
        .then(parseBookContent)
        .then(function(result) {
            // Ignore content of this book when generating parent book
            ignore = ignore.add(langID + '/**');
            currentBook = currentBook.set('ignore', ignore);

            return currentBook.addLanguageBook(langID, result);
        });
    }, book);
}
function parseMultilingualBook ( book ) { var languages = book . getLanguages ( ) ; var langList = languages . getList ( ) ; return Promise . reduce ( langList , function ( currentBook , lang ) { var langID = lang . getID ( ) ; var child = Book . createFromParent ( currentBook , langID ) ; var ignore = currentBook . getIgnore ( ) ; return Promise ( child ) . then ( parseConfig ) . then ( parseBookContent ) . then ( function ( result ) { // Ignore content of this book when generating parent book ignore = ignore . add ( langID + '/**' ) ; currentBook = currentBook . set ( 'ignore' , ignore ) ; return currentBook . addLanguageBook ( langID , result ) ; } ) ; } , book ) ; }
Parse a multilingual book

@param {Book} book
@return {Promise<Book>}
Parse a multilingual book
Parse multilingual book