Awesome
<div align="center"> <!-- replace with accurate logo e.g from https://worldvectorlogo.com/ --> <a href="https://github.com/webpack/webpack"> <img width="200" height="200" vspace="" hspace="25" src="https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg"> </a> <h1>i18n Plugin</h1> <p>i18n (localization) plugin for Webpack.<p> </div> <h2 align="center">Install</h2>npm i -D i18n-webpack-plugin
<h2 align="center">Usage</h2>
This plugin creates bundles with translations baked in. So you can serve the translated bundle to your clients.
see webpack/webpack/examples/i18n.
<h2 align="center">Options</h2>plugins: [
...
new I18nPlugin(languageConfig, optionsObj)
],
optionsObj.functionName
: the default value is__
, you can change it to other function name.optionsObj.failOnMissing
: the default value isfalse
, which will show a warning message, if the mapping text cannot be found. If set totrue
, the message will be an error message.optionsObj.hideMessage
: the default value isfalse
, which will show the warning/error message. If set totrue
, the message will be hidden.optionsObj.nested
: the default value isfalse
. If set totrue
, the keys inlanguageConfig
can be nested. This option is interpreted only iflanguageConfig
isn't a function.