webpack-chrome-i18n-plugin
v1.0.1
Published
![img](https://img.shields.io/github/license/icepy/farm-platfrom.svg)
Downloads
8
Readme
webpack-chrome-i18n-plugin
Chrome Extension i18n 国际化支持的 Webpack plugin
Install
$ yarn add webpack-chrome-i18n-plugin
Usage
const WebpackChromeI18nPlugin = require('webpack-chrome-i18n-plugin');
[
new WebpackChromeI18nPlugin({
filename: './i18n.json',
localizes: ['zh_CN']
})
]
- filename:i18n.json 文件路径
- localizes:需要提取的国际化支持,可在 https://developer.chrome.com/webstore/i18n?csw=1#localeTable 中查询,默认提取
zh_CN
- space:JSON 格式输出的 Space,默认等于
2
i18n.json
i18n.json
格式如下:
{
"localize_key": {
"zh_CN": {
"message": "icepy"
},
"en": {
"message": "icepy"
},
"zh_TW": {
"message": "icepy"
}
}
}