translate-sidecar is a WordPress plugin for operators of multilingual sites. It keeps each translation in a table of its own, serves it at /xx/slug/ as a view of the original post, and guards machine translation against partial and wrong-script output. It is MIT licensed, and v0.1.0 was released on 19 November 2026.
It was written from scratch from an idea, as part of a set of utilities built between 11 and 19 November 2026 by language-model coding agents under the editor’s direction. It has not run on a live site. Indian Opinion itself has been English only since September 2026 and does not publish other languages. This plugin is released for other sites.
The common way to translate a WordPress post is to create a second post per language and link the copies. That has four costs.
/xx/slug/ to the original post’s template with the title, body, excerpt, document title, lang and dir swapped. Images, author, dates and comments stay the original’s.og:locale and JSON-LD with inLanguage.Translations live in one table keyed on post and language, with states queued, running, failed, candidate, live, rejected, withdrawn and prior. A unique key on a generated column enforces one live and one candidate row where the database supports it, and a lock in code covers the rest. A translation memory table and a counters table complete the schema. Nothing joins post meta.
The segmenter cuts the body at block level. Inline tags become numbered placeholders such as {1}text{/1}. URLs, attributes, block comments, code, shortcodes and embeds never reach the model, and the markup between segments is kept byte for byte.
The guards run on every call and on the assembled result. Every segment must come back once, untruncated, with its placeholders. The result must keep its structure, stay inside a length ratio of 0.4 to 3.0, keep its numbers, not come back unchanged, match the declared and detected language, and be mostly in the target script. Any failure fails the whole job and stores nothing. The script guard proves the script, not the language, so a detector can be plugged in with translate_sidecar_detect_language.
wp translate-sidecar request 123 --lang=fr
wp translate-sidecar run
wp translate-sidecar guard <row-id>
wp translate-sidecar approve <row-id>
noindex, follow. The README advises turning indexing on for one language at a time.wp_kses_post. The prompt presents segments as data, which lowers the risk of hidden instructions, and review remains the control./xx/ redirects to the site home.There are no open issues. This is v0.1.0, tested on stubs, mocks and a throwaway MySQL. The suite has 159 tests and 1130 assertions, including six integration tests against a throwaway MySQL 8.0, and the model adapter was tested against the library’s mock transport with no network. Static analysis and code style checks pass. No real model, search engine or page cache has been involved, and CI has not yet run on GitHub.
Requires PHP 8.1 or later, WordPress 6.4 or later, MySQL 5.7 or later or MariaDB 10.4 or later, and pretty permalinks. The model adapter depends on llm-json-php, which is not on Packagist yet, so add its repository first.
composer config repositories.llm-json-php '{"type": "vcs", "url": "https://github.com/IndianOpinion/llm-json-php", "no-api": true}'
composer require indianopinion/translate-sidecar
Without Composer, unzip a release into wp-content/plugins/translate-sidecar/. The manual adapter and a site-supplied caller work without the library.