i18n-webpack-plugin

Embed localization into your bundle

MIT 13 个版本
安装
npm install i18n-webpack-plugin
yarn add i18n-webpack-plugin
pnpm add i18n-webpack-plugin
bun add i18n-webpack-plugin
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
版本列表
1.0.0-beta.1 2017-06-06
1.0.0-beta.0 2017-05-01
1.0.0 2017-06-10
0.3.0 2016-07-13
0.2.7 2014-12-15
0.2.6 2014-11-27
0.2.5 2014-11-27
0.2.4 2014-10-14
0.2.3 2014-01-31
0.2.2 2013-12-17
0.2.1 2013-06-20
0.2.0 2013-06-04
0.1.0 2013-02-19