An auto i18n translation tool for ZeppOS
中文文档
Report Bug
·
Request Feature
A simple automatic i18n translation tool. You only need to write one .po file, and it will automatically generate .po files for other languages, helping developers quickly complete i18n translation tasks.
You need to install Node.js and the required dependencies. For more details, please refer to Installation.
npm install @x1a0ma17x/zeppos-auto-i18n-translator -g
After installation, run the following command to generate the configuration file:
z18n
Configuration file parameters:
Parameter | Description | Type | Example |
---|---|---|---|
originLang | Original language | string | zh-CN |
targetLangs | Target languages | array | ["en-US", "zh-TW", "ru-RU", "fr-FR"] |
workingPath | i18n folder path | string | ./example/page/i18n |
adapter | Translation channel | string | Translated |
Both originLang
and targetLangs
should be standard language codes. Refer to the language codes supported by ZeppOS for more details.
Currently supported adapters:
Adapter | Description |
---|---|
Translated | Translation channel |
Once the configuration file is set, simply run z18n
to complete the translation.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE.txt
for more information.
XiaomaiTX - i@lenrome.cn
Project Link: https://github.com/XiaomaiTX/zeppos-auto-i18n-translator