0.0.2 • Published 4 years ago

@ikaxio/i18nt v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

xio-i18nt

i18next封装包,配合i18nt-scaner使用

搭建

yarn
node ./demo/index.js

输出 "中文" 成功

作用

为要翻译的字符自动生成文件的key

以前: zh.json

{
    "key": "值"
}

en.json

{
    "key": "value"
}

i18next.t("key") 中文环境得到:值 英文环境得到:value

现在: zh.json

{
    "(key自动生)": "值"
}

en.json

{
    "(key自动生)": "value"
}

i18next.t("值");
中文环境得到:值
英文环境得到:value

不再需要自己写json文件了,配合i18nt-scaner使用。