How this blog translates itself into three languages
Translated from Russian. Read the Russian original.
I'm writing this post in Russian. A few minutes after it goes live, it will have Spanish, Portuguese and English versions. I don't order them, I don't paste anything into a translator, and I don't proofread them line by line.
An AI agent does the translating, but "hand the text to a model" is the smaller part of the system. The bigger part is everything around it: who decides what to translate, how the agent learns the rules, how mistakes get caught, and what the reader sees while a translation isn't ready yet.
The nice thing about this post is that you can check everything it describes: the language switcher is at the top of the page.
Why four languages from day one
The topics on this blog are just as useful to a founder who reads in Spanish, Portuguese or English. Writing four versions by hand isn't realistic. Writing only in Russian means cutting off most of the readers.
So the rule from day one: the original is in Russian, translations are automatic, in all three languages, for every post.
The setup
| Step | Who does it | Tokens |
|---|---|---|
| Find what needs translating | queue script | 0 |
| Translate using the brief and glossary | AI agent | yes |
| Check itself against a checklist | the same agent | yes |
| Push to the repository | autosync script | 0 |
| Build the site in four languages | builder script | 0 |
The AI does exactly one thing here: translation. Everything else is script-first.
The queue: the agent sleeps while there's nothing to do
Once an hour, a small script runs on the server. It compares every published post with its translations and outputs a list of tasks: "this translation is missing" or "the translation exists, but the original has changed."
How does it know the original changed? Every translation stores a short fingerprint of the original in its header: twelve characters of a hash. Change even a comma in the post, and the fingerprint is different, so the translation goes into the queue.
If the queue is empty, the script prints a single line: "don't wake the agent." And the agent doesn't start. Twenty-three hours out of twenty-four, the check costs zero tokens.
The first version of the queue printed its answer across several lines, and the system that decides whether to wake the agent didn't recognize it. We caught that in a live test before launch: the rule "the last line is the decision" is now written into the project's memory.
The brief: the rules on one page
Before every run, the agent reads the brief. The key points:
- Translation, not a retelling. Don't add or remove facts, numbers, steps or links.
- One voice, three language variants. Spanish: neutral Latin American, using "tú." Portuguese: Brazilian, using "você." English: American, simple and direct.
- Jokes by meaning. If one doesn't translate, replace it with a neutral phrase.
- Don't touch the code. Commands, file names, URLs: character for character as in the original.
- Its own URL is fine, but only once. If people search for it noticeably more that way in a given language, the agent gives the translation its own URL. An existing URL never changes: it's already in search results.
The agent uses that last point wisely. The "Incident log" post lives at incident-log in English, and "Retro with AI" is at retro-semanal-con-ia in Spanish. Of 27 translations, nine got their own URLs.
The glossary: it grows with every post
The same term should be translated the same way across all posts. For that there's a four-language table: "навык → skill," "источник правды → fuente de verdad / fonte da verdade / source of truth."
If the agent runs into a term that isn't in the table, it doesn't quietly invent an option. It translates it the usual way and suggests a new row in its report. Whether to add it is my call. That's how the glossary grew from a basic set to 27 terms in one day and nine posts.
Self-check before saving
Before writing the file, the agent checks itself on four points:
- The header is there, and the original's fingerprint matches the task.
- There are as many sections as in the original.
- The code matches the original character for character.
- There's no Cyrillic in the text, except for examples left in on purpose.
After the agent, I recheck the same points with terminal commands. Across nine posts, no mismatches turned up.
The story of the code comments
The first post with code broke everything in style. The brief said: don't touch the code. The agent obediently left the comments inside the code in Russian, so the English version had # агент спит, токены не тратятся hanging in it.
Technically the rule was followed; in practice, it wasn't. I decided: comments get translated, the code itself doesn't. The brief got an exception, and point 3 of the self-check became more precise: "the code matches once comments are removed." The post was retranslated under the new rule, and the next post with code passed on the first try.
What the reader sees while a translation is on its way
If I've edited the original and the new translation isn't ready yet, the old translation doesn't disappear. The reader sees it with a note in their language: "The original has been updated; the translation will be updated soon." The site stays honest without going empty.
Each language version also knows about its siblings: search engines see that it's one post in four languages and show readers the version in their language.
Security: the agent only changes texts
The site is built by a separate script with server admin rights. So the agent can't accidentally become an admin, the builder takes only the post and translation texts from the agent's working folder. The builder's code lives separately, and the agent can't change it.
The agent doesn't touch git either: its files are picked up and pushed by the sync script. It broke once, when I pushed my own edits while unpushed translations were sitting on the server. The case went into the incident log, and now the script first pulls everyone else's changes and only then pushes its own.
How long it takes
On schedule, a translation appears a little over an hour after publishing. When I'm in a hurry, I run the translator manually, and three versions of the post are ready in about three minutes.
My job in this system: write the original and occasionally decide whether to add a row to the glossary.
What to take for yourself
- Separate "what to translate" from "how to translate." The first is a script with fingerprints, the second is AI.
- Write a one-page brief: language variant, form of address, what not to touch.
- Set up a glossary and let the agent suggest rows, but not add them itself.
- Give the agent a self-check checklist that a script can verify again.