LRob – AI Translator: WordPress site translation with Claude AI, using the context of each page

AI Translator is a WordPress plugin that translates your site with Anthropic’s Claude models. You write in your language; each page is translated once, in the background, with the context of the entire page, and served at its own URL in each of the languages you choose.

Version 0.5.3NewGPL-2.0-or-later

Translations are done by the Claude models, with your own Anthropic API key. The plugin itself is free. It is still young (version 0.2) and evolves quickly: new versions come out often.

Translations that read the whole page

  • The whole page in context: title, headings, neighboring paragraphs
  • Names of people, brands and products kept as they are
  • Your instructions followed: the site’s subject, its audience, its tone
  • Your corrections never overwritten
  • A translation editor: each text next to the original

Sentence-by-sentence translation loses the thread: an ambiguous word, a pronoun or a technical term gets translated poorly without what surrounds it. AI Translator sends the page as a document, and only asks for the pieces that need translating.

From a translated page or from the list of translations, Edit translation opens a screen where each text is shown next to the original. You fix a sentence: it is kept. You change an image, a video or a link: that block keeps your choice in that language only. You can also request a new translation of a single text with an instruction (“shorter”, “use the informal ‘you’”), or ask for three variants to choose from.

One URL and one SEO setup per language

  • Translated URLs: /hebergement/tarifs/ becomes /en/hosting/pricing/
  • hreflang tags pointing to the other languages, with x-default
  • Canonical URL and declared language on every page
  • Sitemap including the translated pages
  • Rank Math: title, description, and structured data translated

Your main language stays at the root of the site, and each other language lives under its own prefix (/en/, /de/). A renamed page keeps its old URL, which leads to the new one. With Rank Math, breadcrumbs, categories, and tags also follow the page’s language.

A language switcher as a block

  • Language Switcher block, or a shortcode
  • Flag, name, or short code (EN), alone or together
  • Inline or as a dropdown menu, usable with the keyboard
  • Optional floating switcher, in a corner of every page

Place the block in your header: it leads to the same page in the other language. You configure it for the whole site, with a preview, or block by block. The floating switcher picks up your theme’s colors, and its distance from the edges can be adjusted to leave room for a chat button.

A post written in another language

  • “Written in”: the original language is chosen post by post
  • Translated into every language of the site, the main one included
  • The original served as is under its language prefix

Most translation plugins assume the whole site is written in a single language. If your site is in French and an author publishes a post in English or Spanish, you just need to say so in the Languages panel of the editor: the post is translated into French and into the other languages, and each visitor reads it in their own.

How it works

  1. You publish or edit a page.
  2. After a delay you set, it goes into the queue.
  3. Only new or changed passages are sent, with the page as context.
  4. Each response is checked against the original: same tags, same links.
  5. The translation is saved, then served at its URL.

Nothing is translated while a page is being served: a visitor or a bot never triggers a translation and never waits for one. A translated page costs a few fast database queries, and nothing at all behind a page cache. Your existing content is translated when you ask for it, after a cost estimate.

When a page changes, you can choose from three modes: retranslate everything, Balanced (the default: what changed, along with its section when the section changed a lot), or Economical: only what changed, sent in batches at half price, usually within the hour.

Prepare translations before showing them

  • Translate automatically: a switch; when off, nothing is spent
  • Show translated pages: a switch; when off, only your team sees them
  • Preview of each translation, reserved for the people who edit the site
  • Side-by-side review with the original

As long as translated pages aren’t shown, visitors and search engines see the original site. You translate, you review, then you open the languages when everything is ready.

What is never sent

  • Excluded URLs: a client area, account pages
  • A page or a block that you mark
  • Card numbers, IBANs, passwords, access keys
  • Form fields: their values are never read
  • The admin area and what a logged-in visitor sees

An excluded URL (/compte/ covers that page and everything below it) is never read or sent. A passage that contains sensitive data is left as is, and every request is checked one last time before it leaves the site. Nothing is sent to anyone other than Anthropic, and only the content you are translating.

Leave TranslatePress without changing a single URL

  • Side-by-side installation: TranslatePress keeps serving the site
  • Dry run: languages, URLs, content, estimated cost, without writing anything
  • URLs preserved: existing translated URLs are enforced
  • Rollback possible: TranslatePress data is left untouched

As long as another translation plugin is active (TranslatePress, WPML, Polylang, Weglot), AI Translator prepares its translations and changes nothing on your visitors’ pages. The dry run lists the URLs that would change, and none is expected; you apply, you translate, then you deactivate TranslatePress. The blocks and shortcodes of its language switcher keep working.

From another plugin, the URLs screen picks up a table of your translated URLs, compares it with the ones AI Translator will serve, then enforces them.

Capped spending, on your Anthropic account

  • Daily and monthly caps, $5 and $50 to start
  • Cost estimate before translating existing content
  • Confirmation requested above an amount you set
  • Only what changed is retranslated
  • Deferred batches at half price, optional
  • Log of every call, with its estimated cost

API costs remain yours. The plugin is free, but each translation is billed by Anthropic to your own key: LRob receives nothing and is not responsible for these expenses. The plugin’s caps rely on estimates and are not foolproof. Set them as soon as you install, and also set a monthly spending limit in your Anthropic account: that is the one that counts.

To give you an order of magnitude: the first translation of a 1,500-word article into one language costs about $0.03 with Claude Sonnet 5.5, and about $0.002 with Claude Haiku 5.5. Fixing a sentence afterward costs a small fraction of that.

Installation and updates

  1. Download the .zip from the releases page.
  2. Plugins, Add New, Upload Plugin, then activate.
  3. AI Translator, Settings: your Anthropic key, the model, your languages.
  4. AI Translator, Translations: translate your existing content, after an estimate.
  5. Show the translated pages and place the Language Switcher block in your header.

After that, new versions show up on their own in WordPress’s Updates page, just like a plugin from wordpress.org: they come from LRob’s code server, git.lrob.net.

You need WordPress 6.7 or newer, PHP 8.4 or newer (8.5 recommended), a permalink structure other than “Plain”, and an Anthropic API key.

Frequently asked questions

Is AI Translator free?

The plugin is: GPL license, no subscription or paid version. Translations go through Anthropic’s API with your own key, and are billed to you by Anthropic.

Does it work with a model other than Claude?

No. AI Translator is only compatible with Anthropic’s Claude models. You choose the model from a list that comes from Anthropic and updates itself.

Does it slow down the site?

No: translations happen in the background, never while a page is being served. Translated pages stay compatible with a page cache, and the plugin itself clears the cache of the main caching plugins when a translation changes.

Can I correct a translation by hand?

Yes, in the block editor or from the Translations screen. Your correction is never overwritten: when the original changes, it is kept and flagged for review.

Where is my API key stored?

In wp-config.php, the safest place, or in the settings, where it is saved encrypted. It is never displayed again, never sent to the browser, never written to the log.

Is my theme’s text translated?

With a block theme, yes: header, footer, templates, and patterns. Text from themes and plugins comes from their own translation files. Text hard-coded in the PHP templates of a classic theme is not translated.

Why LRob created AI Translator

LRob is a web host specializing in WordPress. A fast, well-ranked site in several languages called for translations done once and for all, with an understanding of the page, without adding anything to load time.

So LRob wrote the tool it needed for its own sites. Like the other LRob plugins, it is distributed for free.

Changelog : notes de version

All releases on the forge

Source code and license

AI Translator is released under the GPL 2.0 or later license, like WordPress: free, at no cost, with no paid version. The code, releases, and issue tracking are at git.lrob.net/WP/ai-translator, the guides are in the repository wiki; for a bug or an idea, open a ticket on the repository.

The other LRob WordPress plugins

All the plugins, sorted by use, are on the LRob Plugins page.