i18n-webpack-plugin

1.0.0 • Public • Published

npm deps test coverage chat

i18n Plugin

i18n (localization) plugin for Webpack.

Install

npm i -D i18n-webpack-plugin

Usage

This plugin creates bundles with translations baked in. So you can serve the translated bundle to your clients.

see webpack/webpack/examples/i18n.

Options

plugins: [
  ...
  new I18nPlugin(languageConfig, optionsObj)
],
  • optionsObj.functionName: the default value is __, you can change it to other function name.
  • 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.
  • optionsObj.hideMessage: the default value is false, which will show the warning/error message. If set to true, the message will be hide.

Maintainers


Juho Vepsäläinen

Joshua Wiens

Kees Kluskens

Sean Larkin

Readme

Keywords

none

Package Sidebar

Install

npm i i18n-webpack-plugin

Weekly Downloads

3,726

Version

1.0.0

License

MIT

Last publish

Collaborators

  • evilebottnawi
  • sokra
  • jhnns
  • michael-ciniawsky
  • d3viant0ne
  • ericclemmons
  • thelarkinn