m12n
v1.1.2
Published
An automatic and continuous translator for your Mobile and Web apps
Downloads
61
Maintainers
Readme
m12n - Automatic Mobile and Web App Translator
m12n is a command-line tool for automatic and continuous translation of mobile and web app localization files. It uses ChatGPT to translate ARB (Application Resource Bundle) files for Flutter and JSON files for React, making it easier to internationalize your applications.
Installation
To install m12n globally, run:
npm install -g m12n
Features
- Automatic translation of ARB files
- Continuous monitoring of source language file changes
- Customizable language support
- Integration with OpenAI's ChatGPT for high-quality translations
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Usage
Set up your OpenAI API key:
- Go to OpenAI API and generate a new API key.
- Set the API key in your environment variables:
export OPENAI_API_KEY=<your-api-key>
Install m12n globally:
npm install -g m12n
Translate ARB files (flutter) or JSON files (react):
m12n translate flutter <locale> m12n translate react <locale>
The translated ARB files will be saved in the
lib/l10n
directory (flutter) orpublic/locales
directory (react).
License
This project is licensed under the MIT License - see the LICENSE file for details.