This site uses cookies to enhance your user experience

By clicking the Accept button, you agree to us doing so.

Translate JavaScript locale files with AI

AI-generated JSON locale files for JavaScript projects

npm install olelo-honua
ʻŌlelo Honua Logo

Generate and maintain JSON locale files

ʻŌlelo Honua White Logo

Keep JavaScript locale files in sync

Maintaining JSON translations by hand takes time, and new or changed strings can leave locale files out of sync. ʻŌlelo Honua uses an OpenRouter model to generate locale files from your source JSON.

Start with a source file such as locales/en.json, choose the languages you need, and run hanaHou(). Generated locale files are saved under locales/; translations can be cached to avoid repeating work.

Generated translations should be reviewed by a fluent speaker before release.

How it works

  1. Install the package and create a source JSON locale file.
  2. Configure an OpenRouter API key, model, and target languages.
  3. Run the translator to generate or update locale files.

For example, a source entry like {"welcome":"Welcome to our app"} can be translated to {"welcome":"Te damos la bienvenida a nuestra aplicación."} for Spanish while keeping the same key.

await translator.hanaHou();

The library works with JSON locale files and can fit into Node.js build workflows. Integration guides demonstrate using generated files with Next.js, Remix, and Shopify; they are examples, not separate provider integrations.

Read the setup guide · Browse the source on GitHub

Pronunciation

ʻŌlelo Honua (Oh-leh-loh Ho-noo-ah)