Skip to content
This repository has been archived by the owner. It is now read-only.
[DEPRECATED] Embed localization into your bundle
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github test: Initial Jest test suite (#49) May 21, 2017
src style: rename params for clearity, update && added comments (#66) Nov 20, 2017
test test: Initial Jest test suite (#49) May 21, 2017
.babelrc chore(defaults): Updates to defaults 1.1.0 Jun 6, 2017
.editorconfig refactor: apply webpack-defaults (#41) May 1, 2017
.eslintignore test: Initial Jest test suite (#49) May 21, 2017
.eslintrc refactor: apply webpack-defaults (#41) May 1, 2017
.gitattributes chore(defaults): Updates to defaults 1.1.0 Jun 6, 2017
.gitignore
.travis.yml ci(travis): Implements build stages for webpack@canary (#52) Jun 10, 2017
CHANGELOG.md chore: Update changelog for 1.0.0 Jun 10, 2017
LICENSE refactor: apply webpack-defaults (#41) May 1, 2017
README.md
appveyor.yml ci(travis): Implements build stages for webpack@canary (#52) Jun 10, 2017
package-lock.json ci(travis): Implements build stages for webpack@canary (#52) Jun 10, 2017
package.json

README.md

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 hidden.
  • 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.

Maintainers


Juho Vepsäläinen

Joshua Wiens

Kees Kluskens

Sean Larkin
You can’t perform that action at this time.