On this page
Translating a tech blog into three languages with an LLM takes seconds per article; keeping Italian, English, and Spanish versions linked without duplicates or conflicting search signals is a completely different engineering problem. When a site serves Italian at the root, English under /en/, and Spanish under /es/, every language group needs distinct URLs, self-referencing canonicals, and strictly reciprocal hreflang links. As Google Search Central documents, if even one return link is missing, search engines may ignore the annotation.




Last week we looked at how an editorial budget enforced in code sets caps and a quiet day. Today we open the next layer of the pipeline: translation control. On AndroidLab, a translation never starts as a loose rewrite of an Italian post. It passes through three verifiable stages: candidate filtering, source-post verification, and atomic translation-group linking.
Why we do not bulk-translate the archive
When automation and LLMs are already in place, the easiest temptation is to run a loop across the entire archive and triple the page count overnight. It is also the fastest way to flood a domain with mechanical translations of dated or locally scoped news. On AndroidLab, bulk archive translation is disallowed by editorial policy: only scheduled rubrics (AI Lab, RetroLab, and Diario di Laboratorio) and our own software projects ship automatically as IT/EN/ES trios.
For the rest of the catalog, the selective Spanish queue relies on a read-only script (androidlab_spanish_candidates.py) that enforces a fixed cutoff from October 26, 2026, skips posts that are already linked or tied to an existing source record, and separates recent editorial articles (the last 14 days, evaluated on quality and international usefulness) from older pieces that require documented traction. The script has zero publishing side effects: it only surfaces eligible candidates for editorial review.
Source verification before a single image uploads
Whenever an English or Spanish translation is approved, the publishing script receives the Italian post ID via the ANDROIDLAB_TRANSLATION_SOURCE_IT_ID environment variable. Before uploading media or creating a WordPress post, androidlab_translation_source.py runs a strict check against the live original.
Four conditions must hold at the same time:
- Real status and language: the source post must exist, have type
post, be inpublishstatus, and be identified as languageit. - Byline consistency: the expected translation author must match both the actual WordPress author of the Italian source and its
_androidlab_editorial_authormetadata. An article written under Michele Dipace in Italian cannot silently switch to Kaffeine in Spanish because of a misconfigured job. - Controlled technical inheritance: if the Italian original belongs to
guide-tecnicheortutorial, that verified technical category is forwarded into author preflight, preventing false routing conflicts when the translated post uses theenglishorspanishcategory. - Source-level duplicate lock: on the server side, the publisher checks whether another post in the same language category already carries the same
_androidlab_translation_source_it_post_idmetadata, including drafts, scheduled posts, and private entries. If a match exists, publication stops before a second copy is created.
If any of these checks fails, execution exits with code 78 (AUTHOR_PREFLIGHT_FAILED). There is no silent fallback and no attempt to guess the missing language or author.
Linking the trilingual group without breaking existing siblings
Once the translated posts are live, the most fragile step remains: writing the cross-links across IT, EN, and ES. We handle this with androidlab_link_translation_group.py, which takes at least two post IDs (with Italian required) and enforces three hard safeguards before touching WordPress metadata via update_post_meta():
- Status and language check on every ID: if any supplied post is not published or does not match its declared language (
it,en, ores), the script raises an exception and aborts. - Preservation of existing members: if an Italian post was already linked to a published English version and we add Spanish later, the script reads the existing metadata and keeps English inside the group, updating all reciprocal pointers instead of dropping the earlier link.
- Conflict rejection: if a supplied ID conflicts with another published translation already linked to the same group, the script refuses to overwrite it and stops.
Only when the group graph is consistent does the script write the bidirectional metadata (_androidlab_translation_<lang>_post_id and _androidlab_translation_<lang>_url), clear post caches, and flush runtime sitemap caches. From there, the WordPress layer outputs rel="alternate" tags in the head of all three pages using BCP 47 / RFC 5646 language codes (it-IT, en, es) plus hreflang="x-default" pointing to the Italian URL, while each page keeps its own self-referencing canonical.
What actually changes, and where automation stops
Operationally, moving translation-group integrity into code eliminates a whole class of silent failures: one-way hreflang annotations, orphaned translations, duplicate copies created after a timeout, and mismatched bylines across languages. Live verification with real HTTP requests (both standard and cache-busted) then confirms the tags are actually present in the HTML served to browsers and crawlers, not merely stored in the database.
Even so, there is a clear line no metadata script can cross. Code can prove that the English and Spanish posts point to the right Italian source and return HTTP 200, but it cannot tell whether an idiom reads naturally, whether an important technical caveat survived translation, or whether cautious wording quietly turned into a flat claim. Structural graph integrity automates well; editorial fidelity in the prose still belongs to review.
In short
- AndroidLab does not bulk-translate its archive: only scheduled rubrics and own-software coverage always ship in IT/EN/ES, while other articles go through read-only candidate filtering.
- Before any translation publishes,
androidlab_translation_source.pyverifies the Italian post’s status, language, and author, blocking mismatches and duplicate translations of the same source ID. androidlab_link_translation_group.pywrites bidirectional metadata while preserving existing published siblings and rejecting conflicting groups, enabling reciprocalhreflang(it-IT,en,es, and Italianx-default) with self-referencing canonicals.- Scripts enforce link and language integrity, but they cannot judge natural phrasing or whether technical nuances survived translation.