Skip to content
master
Go to file
Code
This branch is 5 commits behind gawkermedia:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

webpack-closure-i18n

(NOTE: this project is new and experimental -- it may still be rather buggy)

This is a set of two Webpack plugins for translating Closure Templates in a "post-build" fashion. After Webpack has already built asset bundles, but before it has emitted them, the i18n plugin translates all MSG_EXTERNAL_(\d+) definitions found in the bundles into locale-specific output.

Fast Closure Translater is used to perform the actual work of translation.

This is intended as a fast alternative to the multi-compiler approach to translation shown in https://github.com/webpack/webpack/tree/master/examples/i18n. While that approach works nicely for projects of many sizes, it becomes slow in projects with very large dependency trees or a large number of translations, as it forces Webpack to handle a dependency tree with size matching NUMBER_OF_DEPENDENCIES * NUMBER_OF_TRANSLATIONS.

PostCompileI18nPlugin

This plugin handles the actual translation. See i18n-plugin.js for documentation on usage.

PostCompileI18nAssetsPlugin

This plugin handles generating a JSON file mapping bundle names to locale-specific bundle paths. See assets-plugin.js for documentation.

About

This is a set of plugins for Webpack for post-build i18n of Closure Templates

Resources

Packages

No packages published
You can’t perform that action at this time.