This site uses cookies to enhance your user experience
By clicking the Accept button, you agree to us doing so.
This site uses cookies to enhance your user experience
By clicking the Accept button, you agree to us doing so.
A Node.js library that automates LLM-powered translation file generation and synchronization for i18n workflows. Point it at your base locale file, configure a provider, and it generates or updates locale files for every target language—with optional critique and repair passes for higher quality output.
Works alongside tools like i18next and i18next-scanner to fill the gap those tools leave: the actual translation.
For a detailed look at how the translation, critique, and repair pipeline works, see docs/deep_dive.md.
npm install olelo-honua
# or
yarn add olelo-honua
const { OleloHonua } = require("olelo-honua");
const translator = new OleloHonua({
provider: {
platform: OleloHonua.Providers.OpenRouter,
credentials: {
apiKey: process.env.OPENROUTER_API_KEY,
},
modelId: OleloHonua.OpenRouterModels.NVIDIA.NEMOTRON_3_ULTRA_550B_FREE,
},
primeLanguage: "en",
includeLanguage: ["haw", "es", "fr", "de", "zh", "ja", "ko", "ar", "ru"],
});
// Generate or sync all locale files
translator.hanaHou(); // alias: createLocaleFiles()
primeLanguageThe primeLanguage must have a corresponding locale file (e.g. locales/en.json) that serves as the source for all translations. All other languages are generated from it.
# Generate locale files from a config
npx olelo-honua init --config ./local.config.json
# Sync after updating your base locale file
npx olelo-honua sync
| Flag | Description |
|---|---|
--config <path> |
Path to config file. Defaults to local.config.json in the current directory. |
--debug |
Enable verbose logging. |

Store your API key in a .env file (add it to .gitignore):
OPENROUTER_API_KEY=<your_key>
Load it in your app:
require("dotenv").config();
{
"primeLanguage": "en",
"provider": {
"platform": "OpenRouter",
"credentials": {
"apiKey": "<your_openrouter_api_key>"
},
"modelId": "nvidia/nemotron-3-ultra-550b-a55b:free"
},
"retries": {
"mainLoop": 3,
"critiqueLoop": 2,
"repairLoop": 1
},
"debug": false,
"includeLanguage": ["haw", "ar", "es", "fr"],
"maxChunkRequests": 4,
"additionalConfig": {
"critique": true,
"saveCritique": false,
"repair": false,
"multiLanguageAgreementThreshold": 0.8
}
}
Supports OpenRouter, OpenAI, Google Cloud Translation, and local LLM providers.
OpenRouter gives you access to many free models without needing separate provider accounts. Recommended starting point.
nvidia/nemotron-3-ultra-550b-a55b:freenvidia/nemotron-3-super-120b-a12b:freenvidia/nemotron-3-nano-30b-a3b:freenvidia/nemotron-3-nano-omni-30b-a3b-reasoning:freenvidia/nemotron-nano-9b-v2:freegoogle/gemma-4-31b-it:freegoogle/gemma-4-26b-a4b-it:freegoogle/gemini-3-flash-previewgoogle/gemini-3.5-flashgoogle/gemini-2.5-progoogle/gemma-3-4b-it:freegoogle/gemma-3-12b-it:freegoogle/gemma-3-27b-it:freedeepseek/deepseek-v4-flashdeepseek/deepseek-v4-prodeepseek/deepseek-v3.2deepseek/deepseek-r1-0528deepseek/deepseek-chat-v3-0324:free (legacy free)meta-llama/llama-4-maverick-17b-128e-instructmeta-llama/llama-4-scout-17b-16e-instructmeta-llama/llama-3.3-70b-instruct:freemeta-llama/llama-3.2-3b-instruct:freeqwen/qwen3-coder:freeqwen/qwen3-235b-a22b-2507qwen/qwen3.6-flashqwen/qwq-32b:freemistralai/mistral-small-2603mistralai/mistral-medium-3.5mistralai/devstral-2512cohere/north-mini-code:freepoolside/laguna-xs-2.1:freeopenai/gpt-oss-20b:freeopenai/gpt-oss-120bopenai/gpt-5.6-solopenai/gpt-5.6-terraopenai/gpt-5.6-lunaopenai/gpt-5.5openai/gpt-5.4openai/gpt-5.4-miniopenai/gpt-5openai/gpt-5-miniopenai/gpt-4oopenai/gpt-4o-miniFree models have rate limits. If you hit quota errors, reduce
maxChunkRequestsor switch to a paid model.
Completed translations are saved to .translations_cache.json to avoid redundant API calls on subsequent runs. To force a full retranslation:
rm .translations_cache.json
hanaHou() as part of a build step or deployment script to keep locale files in sync.Includes Hawaiian and 80+ others:
See docs/contributing.md.
MIT
