24 |
25 | This plugin creates bundles with translations baked in. So you can serve the translated bundle to your clients.
26 |
27 | see [webpack/webpack/examples/i18n](https://github.com/webpack/webpack/tree/master/examples/i18n).
28 |
29 |
Options
30 |
31 | ```
32 | plugins: [
33 | ...
34 | new I18nPlugin(languageConfig, optionsObj)
35 | ],
36 | ```
37 | - `optionsObj.functionName`: the default value is `__`, you can change it to other function name.
38 | - `optionsObj.failOnMissing`: the default value is `false`, which will show a warning message, if the mapping text cannot be found. If set to `true`, the message will be an error message.
39 | - `optionsObj.hideMessage`: the default value is `false`, which will show the warning/error message. If set to `true`, the message will be hidden.
40 | - `optionsObj.nested`: the default value is `false`. If set to `true`, the keys in `languageConfig` can be nested. This option is interpreted only if `languageConfig` isn't a function.
41 |
42 |