When an editor at HeartBot updates English source copy and hits save, the system does not overwrite other languages automatically. Background translation only runs when the editor explicitly queues a new draft, so minor wording tweaks leave proofread product terms and localized phrasing intact while new locales can be reviewed across the site before going public.
Why static locale files or auto-overwriting on save fall short
- Revise
Select the target languages
- Translate
Queue a background job
- Review
Approve each language separately
In HeartBot’s early frontend prototype, localization worked by loading per-language JSON translation files in the browser and swapping tagged blocks on the page. That approach stays light when homepage copy rarely changes and page count is small, but as soon as the site needs regular news posts, multiple solution and legal pages, and edits by non-engineers, three bottlenecks appear:
- Every wording change means opening multiple JSON files, matching keys, and re-uploading, which makes handover to non-technical teammates difficult.
- Language switching lives only in local browser preferences without distinct URLs per locale, hurting search indexing and direct sharing of locale-specific links.
- Editors cannot manage a post’s cover image, URL slug, and multilingual body copy on a single screen.
After moving to a CMS, another common over-automation trap shows up: automatically calling AI to retranslate and overwrite every other language whenever English is saved. That creates real risk. If an editor only fixes a punctuation mark or updates a year in English, auto-overwriting wipes out carefully proofread Traditional Chinese brand terminology and makes editors reluctant to touch existing posts.
HeartBot’s backend therefore splits responsibility clearly. The system handles repetitive first-draft translation and structural preservation, while human editors decide when to queue a job, whether to overwrite existing drafts, and when a locale becomes visible on the public site.
The full lifecycle of a multilingual entry
In HeartBot’s Laravel and Filament admin panel, each article and static page stores all languages inside a single record (English as the primary source, paired with Traditional Chinese plus backend-staged German, French, and Thai) sharing one URL slug (for example, /en/news/{slug} and /zh-TW/news/{slug}). A new announcement moves from draft to publication in five steps.
Step 1: Write the source copy and save first
An operator opens the entry in the admin panel and writes the title and formatted body (headings, paragraphs, and lists) in the English tab. The system deliberately disables the background translation button until the record is saved, ensuring the entry exists in the database with a stable ID before any downstream job is dispatched.
Step 2: Editor explicitly queues translation
Once the English draft is ready, the editor clicks the background translation action at the bottom of the English tab and confirms the target locales (German, French, Thai, Traditional Chinese) in a confirmation modal. Confirming does not freeze the browser waiting for the model. First, a cache-based status lock checks that no translation job is already running for the entry (preventing double-clicks or duplicate API spend) and marks it as “translation in progress” with a one-hour TTL. Then the system pushes the entry ID, current English title, and converted HTML body onto a background queue and immediately returns a “queued” notice so the editor can move on to the next task.
When a page only needs the English layout carried over without AI translation, the page header also offers a one-click “Copy English content to other locales” action (protected by an overwrite confirmation prompt) so editors can rewrite manually in each locale tab.
Step 3: Background worker translates node by node and verifies the write
The background queue runs in a dedicated worker process with a monitoring dashboard (Horizon) tracking completed, pending, and failed jobs. Each translation job enforces safety bounds of up to 3 retries, a 60-second retry delay, and a 300-second execution timeout, so transient external API timeouts do not drop an entry silently.
The worker does not hand raw HTML blobs to the model and hope formatting survives. It parses the HTML structure first, extracts plain-text nodes inside paragraphs, heading levels, and list items, sends them to the translation model (configured with low randomness for consistent output, with a one-hour cache for identical text in the same locale), and writes each translated string back into its original DOM node to preserve layout hierarchy.
After all target locales finish and persist to the database, the job performs a write-back verification: it re-reads the freshly saved database record, spot-checks that the stored text matches the expected translation, and logs the result. Whether the job succeeds or throws an exception, it clears the entry’s in-progress lock at the end. In case a server crash ever leaves a lock stranded, operations also has a CLI command to clear stale lock flags.
Step 4: Editors switch tabs to proofread and polish
Once the background job finishes, editors switch to the Traditional Chinese or other locale tabs inside the same form to see the populated title and formatted body. There is no copying from external files; they can focus directly on brand terminology, product names, and tone, then save.
Step 5: Access control and per-locale visibility
After proofreading, access to the admin panel and public visibility for each language are separated into three layers.
Admin sign-in is restricted to company-domain email accounts, currently using a single editorial tier where signed-in operators can edit articles, pages, and locale settings. Access to the Horizon queue dashboard is governed by a separate allowlist, keeping daily content work distinct from system operations.
Public language visibility is controlled from a dedicated “Locale management” screen, where each locale has a switch for whether it appears in the public language switcher (the primary locale can be locked on to prevent accidental hiding). HeartBot’s public switcher currently exposes only English and Traditional Chinese while keeping German, French, and Thai hidden. Because routing still serves configured locales, editors can visit a hidden locale’s direct URL to verify real layouts across the site before flipping the public toggle on.
Finally, each article uses a shared publish timestamp for ordering and search visibility, alongside a single shared cover image and URL slug, reducing the chance of missing assets or mismatched URLs across languages.
Where the machine stops and the editor takes over
Laid out side by side, the boundary between automated work and editorial judgment looks like this:
| Stage | Handled by the system | Handled by editors / operations |
|---|---|---|
| Source authoring | Enforces shared slug and cover image across locales; disables translation until saved | Writes primary-locale copy and confirms content structure |
| Dispatching translation | Checks status lock to prevent duplicate jobs; queues the background task | Decides whether to trigger translation and approves the confirmation modal |
| Draft generation | Parses HTML to preserve structure, calls the model, retries on failure, verifies writes, and releases the lock | Moves on to other work instead of waiting on the edit screen |
| Editorial review | Displays all locales side by side as tabs within the same form | Checks brand terms, product names, tone, and link accuracy |
| Launch & monitoring | Renders public switcher per locale toggle; logs queue health and failures in Horizon | Decides when to expose new locales publicly and when to publish |
If the source text changes again, how do editors know to re-check?
This is one of the easiest edge cases to overlook when planning a multilingual site, and HeartBot’s actual implementation comes with two specific behaviors worth stating plainly.
First, saving an edit to the English source does not automatically re-run translation, nor does it generate an “other locales are out of date” badge or alert. That was a deliberate trade-off for a brand site maintained by a single internal marketing team: most edits are small typo fixes or phrasing tweaks, and the team did not want an overeager system overwriting carefully polished Traditional Chinese copy. The flip side is that if an editor forgets to check the other locale tabs, English and Chinese can drift.
Second, if an editor triggers background translation again after a major rewrite, that job updates the title and body across all four target locales in one pass. Daily work therefore splits by scope: for minor edits such as updating a date, swapping a number, or adjusting a sentence or two, editors save English and sync those lines manually in each live locale tab so the rest of the proofread copy stays untouched. For major rewrites or multi-section additions, they save English first, queue background translation for fresh drafts, and review each locale tab in turn.
When a project grows from a brand marketing site into a multi-role or high-compliance knowledge base (like the immigration policy knowledge platform we covered in another note), relying on editors to remember is no longer enough, so we layer explicit source-change tracking on top of this foundation.
In those setups, three additions carry the extra rigor. Storing a hash of the source text each time a translation is generated lets the list view flag affected locales as out of date whenever the source changes and notify the right editors. Turning the single translation button into a target-locale checklist keeps a retranslation of an unpublished language from overwriting a finalized one. And when regional teams own different languages, per-article, per-locale draft, in-review, and published states sit alongside the site-wide switch, separating authoring from publishing rights by role.
What repetitive manual work does this workflow actually remove?
Without long-term time-tracking logs, we will not guess hours saved or percentage efficiency gains. Looking directly at the editorial path, however, this setup removes four error-prone manual handoffs.
Editors no longer pass copy to engineers to paste into static JSON locale files and redeploy, and they do not have to copy and paste between external translation tools and the CMS because headings, paragraphs, and list structures come back intact. Background queues and status locks take long-article wait times out of the browser while preventing accidental double-clicks from duplicating jobs. And keeping cover images, URL slugs, and every language inside a single form removes the need to create separate article records per locale, cutting down missing images and mismatched cross-locale URLs.
For the operations team, every multilingual update stays inside one admin workflow where jobs can be tracked, retried, and reviewed consistently long after launch.
Further reading & services
- Related notes: Choosing a Website Architecture for a Redesign: WordPress, Static Sites, or a Custom CMS?, How Consultants Review AI-Organized Immigration Information Before Sharing It with Clients
- Case study: HeartBot multilingual corporate website and CMS
- Services: Brand and company websites
- Get in touch: Planning a multilingual website or designing an editorial and translation workflow? Let’s talk
