Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

i18n-webpack-plugin

webpack-contrib55.7kMIT1.0.0

Embed localization into your bundle

readme

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

changelog

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.0.0 (2017-06-10)

1.0.0-beta.1 (2017-06-06)

Bug Fixes

1.0.0-beta.0 (2017-05-01)

Bug Fixes

  • index: hide warnings when options.hideMessage is truthy (#45) (d4c7877)

Code Refactoring

BREAKING CHANGES

  • Enforces a minimum NodeJS version of 4.3 via engines & drops support for Webpack v1.x.

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

x.x.x / <year>-<month>-<day>

  • Bug fix -
  • Feature -
  • Chore -
  • Docs -