Blazing Fast, AI-Powered Internationalization for Modern Web Projects
Tired of slow, inaccurate translations holding back your global reach? Say hello to i18n-llm, the game-changing CLI tool that's revolutionizing how developers handle internationalization.
- ⚡️ Lightning Fast: Translate entire projects in minutes, not hours
- 🧠 AI-Driven Accuracy: Harness the power of advanced language models for context-aware translations
- 🔀 Universal Compatibility: Perfect for React, Next.js, Vue, or any project with JSON-based translations
- 🎯 Pinpoint Precision: Maintains your JSON structure flawlessly, only touching what needs translation
- 🌍 Polyglot Power: Support for 20+ languages at your fingertips
- 🛠 Flexible Integration: Works with your existing i18n setup, whether it's part of your app or standalone files
export OPENAI_API_KEY=your_api_key_here
i18n translate -s en -t zh,es,fr -d ./src/locales
Boom! Your entire app just learned to speak Chinese, Spanish, and French. It's that simple.
Whether you're working on:
- A cutting-edge React or Next.js application
- A Vue.js or Angular project
- Or managing standalone localization files
i18n-llm has got you covered. It adapts to your project structure, not the other way around.
i18n-llm works with various project layouts:
your_project/
│
├── src/
│ ├── locales/ (for integrated app translations)
│ │ ├── en/
│ │ │ ├── common.json
│ │ │ └── home.json
│ │ ├── zh/
│ │ └── ... (other language folders)
│
└── i18n/ (or any name for standalone translation files)
├── en/
│ ├── messages.json
│ └── errors.json
├── es/
└── ... (other language folders)
As long as you have language-specific folders containing JSON files, i18n-llm will work its magic!
Get up and running in no time:
go install github.com/Martin2037/i18n-llm@latest
brew tap Martin2037/i18n-llm https://github.com/Martin2037/i18n-llm.git
brew update
brew install i18n
- Set your OpenAI API key:
export OPENAI_API_KEY=your_api_key_here
-
Navigate to your project directory.
-
Let the magic happen:
i18n translate -s en -d ./path/to/your/locales
This command translates all JSON files from English to all supported languages. It's that easy!
Translate to specific languages:
i18n translate -s en -t fr,de,es -d ./src/i18n
-
Ensure your project's localization files are structured (as shown above).
-
Set your OpenAI API key:
export OPENAI_API_KEY=your_api_key_here
-
Cast the translation spell:
i18n translate -s en -t zh,ja,ko,es,fr -d ./src/locales
Watch as i18n-llm:
- Uses English as the source
- Conjures translations in Chinese, Japanese, Korean, Spanish, and French
- Finds your source files in
./src/locales/en/
- Creates or updates files in the respective language folders
-
Marvel at your newly internationalized project!
Excited? We are too! Check out our contribution guidelines and help make i18n-llm even more awesome.
i18n-llm is released under the MIT License. See the LICENSE file for details.
- Powered by OpenAI's cutting-edge language models
- Built with langchaingo for seamless AI interactions
Found i18n-llm helpful? Give us a star ⭐️ and spread the word!