All case studies

DEV3 Technologies · own product

DEV3 AI Translator & Cultural Localizer: AI translation with delta sync for WPML, Polylang and TranslatePress

Our own WordPress plugin: AI translation adapted per market (formality, units, idioms, glossary), with a translation memory that re-sends only the paragraphs you changed, for Polylang, WPML and TranslatePress.

Industry
WordPress plugins

Live project preview

Client systems are private — screenshots shown where permitted.

DEV3 Technologies · own product — screenshots
Side-by-side review per segment: approved, human-edited and AI segments, with link markup shown as numbered placeholders. The last sync reused 3 of 3 segments.

Side-by-side review per segment: approved, human-edited and AI segments, with link markup shown as numbered placeholders. The last sync reused 3 of 3 segments.

The challenge

Machine translation in WordPress usually fails in three places. It breaks markup: Gutenberg block comments, links, shortcodes and attributes come back rewritten or missing. It translates words, not markets: German readers expect formal "Sie", metric units and a decimal comma, and an idiom translated literally reads as nonsense. And it is wasteful: fix one typo in a long page and the whole page is sent to the AI again for every language, overwriting the corrections a human reviewer made last week. On top of that, the three popular multilingual plugins store translations in completely different ways: Polylang and WPML keep one linked post per language, while TranslatePress keeps a dictionary of rendered strings.

Our solution

We built a translation pipeline that treats content as segments, not pages, and remembers every segment it has translated.

Key design decisions

  • Block-aware segmenting. A tokenizer and segmenter turn block markup, classic HTML and shortcodes into text runs. Inline tags become numbered placeholders (<1>link</1>), so the AI never sees URLs, classes or attributes. Translatable attributes (alt, title, placeholder, aria-label, button values) and whitelisted block-comment attributes become their own segments. Rendering a document with no translations reproduces the input byte for byte.
  • Translation memory keyed by content. Each segment is hashed (sha1 of its whitespace-normalized, placeholder-masked source) per locale pair. On a sync, hits are reused and only new or changed segments are sent, batched into one structured-output request.
  • Human edits always win. Memory entries have a status: machine, review, approved or human. An AI write never replaces a human entry, a forced re-translation skips human and approved segments, and a translation post edited directly in WordPress is detected by fingerprint and left alone.
  • Checked answers. Every answer is checked for exact placeholders and glossary rules (do-not-translate and forced terms). Failing segments get one corrective retry; if they still fail, the best attempt is repaired so the markup stays valid and flagged for review.
  • Arithmetic outside the model. Imperial and metric measurements and currency amounts are detected in code, and the exact converted values are passed with the segment, so the model does not do the maths itself.
  • One engine, three storage models. Providers write Polylang linked posts and terms through the pll_* API, join WPML translation groups through WPML's public hooks, or, for TranslatePress, write strings into its dictionary using its own parser and query classes, with paragraphs that contain links registered as translation blocks.

Architecture

Post_Document builds a document from title, content, excerpt, slug, SEO fields (Yoast SEO and Rank Math), WooCommerce attributes, custom fields and terms. Sync_Engine resolves segments against the translation memory, calls the Translator (the Google Gemini API, gemini-2.5-pro by default) for the rest, and passes the rendered values to Post_Writer or the TranslatePress backend. Bulk jobs run in a background queue (Action Scheduler or WP-Cron) with a cost estimate, and saving a translated source post queues a delta sync automatically. A shared core used across DEV3's plugins provides the API client, encrypted key storage, usage logs and licensing; the admin UI is React.

Results

The plugin is complete and is being prepared for release on CodeCanyon and the DEV3 marketplace. What was built and verified:

  • 33 PHPUnit tests (339 assertions) running against real Polylang, plus 9 Jest tests for the admin utilities. WPML is covered through stubs of its public hooks only, because it is a commercial plugin we did not run in the test environment.
  • Delta sync proven in tests: after editing one paragraph, exactly 1 segment is sent per language and the others are reused; with nothing changed, no AI request is made at all.
  • Live checks with gemini-2.5-pro, English to German and French: the glossary brand term was kept, "6 feet" became 1,83 m and "300 lbs" became 136 kg, formal address was used (Sie / vous), an idiom was adapted rather than translated literally, and a re-sync reused 6/6 segments.
  • Browser runs (Puppeteer) covered both storage models: the Polylang flow (bulk job, German and French front end, auto-sync after an edit, review) and the TranslatePress flow (strings written to its dictionary, German front end, review).

Related case studies