Polyglot
Your app and site strings in 43 languages, translated by your own model and checked string by string.
- Linux or macOS
- Python 3.9+
- Local LLM
- 6 file formats

What it does
Polyglot takes the English strings your app and site already have and writes them in up to 42 more languages, in the files and folders each platform expects, using a model you run yourself. Every string comes back checked: if a placeholder, a tag or a name you keep is lost, or the answer is not in the language's script, the string is asked for again, and a string that still fails is left out and reported instead of shipping broken.
- The formats you use. JSON message files (i18next, vue-i18n, next-intl, react-intl), Flutter ARB, Android strings.xml, Apple .strings, gettext .po and Markdown documents, written to values-de, de.lproj, app_de.arb or locale/de.
- Checked string by string. %1$s, {name}, {{count}}, HTML tags, line breaks, URLs and your kept names must come back exactly; the right script, no empty or runaway answers, nothing left in English.
- Real plural forms. Russian gets one, few, many and other, Arabic six forms, Japanese a single form: Android plurals and ICU messages follow each language's own rules.
- Only what changed. Every good translation is remembered, so editing one English string sends one string, not the whole file.
- Your tone and your terms. A product description, a tone, names never to translate and a glossary go into every request, and your comments travel along as notes.
- Your model, your machine. Any OpenAI-compatible server: vLLM, llama.cpp, Ollama or LM Studio, or a hosted API if you choose. No per-word bill.
Tested on a real model
- A real model, six formats, five scripts: a 70-string example app in JSON, Flutter ARB, Android, Apple .strings, gettext and Markdown, into German, Russian, Japanese, Arabic and Spanish, with a 27-billion-parameter open model on our own machine: 346 of 350 strings passed their checks on the way in, in 7.5 minutes on a busy shared server.
- The four that did not were mistakes in our checks, not the model's: a German loanword, an e-mail address and a Japanese plural message. We fixed the checks; the next run sent only those four strings and wrote all 350 in 45 seconds.
- Plural forms right first time: one, few, many and other for Russian, six forms for Arabic, a single one for Japanese.
- All 42 languages: the example's 22 web strings into every language Polyglot knows, from Amharic to Traditional Chinese: 924 of 924 strings written, in 15 minutes.
- And what checks cannot see: in Khmer, "You are offline" came back as "you are online". It is flawless Khmer, so it passed. That is why the documentation asks for a native speaker on the strings that matter most.
What is inside
The translator
Batches to your model, checks, retries with the problem named, a translation memory, languages in parallel.
Six formats
Readers and writers that keep each platform's escapes, folders and plural rules.
The checks
Usable on their own: check a translation you already have against its English source.
An example app
One small app in all six formats with its configuration, to try before your own.
Requirements
- Linux or macOS with Python 3.9 or newer; nothing to install from pip.
- An OpenAI-compatible model server with a multilingual instruction model; ours is a 27-billion-parameter open model.
Good to know
- The checks catch what breaks an app, not wrong meaning: have a native speaker read your store listing, paywall and legal text.
- gettext plural entries stay in English in this version.
- Speed is your model's.
- The checks are free and open source: translation-checks on GitHub. The kit adds the translator, the six formats, plural forms, the memory and a year of updates.
Questions
Which languages?
Arabic, Amharic, Bulgarian, Czech, German, Greek, Spanish, Persian, Finnish, Filipino, French, Scottish Gaelic, Hebrew, Haitian Creole, Hungarian, Armenian, Indonesian, Italian, Japanese, Khmer, Kannada, Korean, Macedonian, Malay, Dutch, Norwegian, Oromo, Punjabi, Polish, Portuguese (Brazil), Romanian, Russian, Slovak, Slovenian, Serbian, Swedish, Thai, Turkish, Ukrainian, Vietnamese and Chinese, Simplified and Traditional, from English.
Does it need a GPU?
Polyglot itself does not; your model server decides. A small model runs on a CPU, slowly; a GPU makes a large file in many languages a matter of minutes.
What happens to a string the model gets wrong?
It is asked for again on its own, with the problem named. If it still fails, it is left out of the file, so your app shows the English for that one string, and the run lists it with the reason. Nothing broken is written.
Can I use a hosted API instead?
Yes: any service with an OpenAI-compatible chat endpoint. Put its base URL and model name in polyglot.json and its key in a file.
Updated: