WordPress
The plugin translates the .pot of a plugin or theme into .po, .mo and .l10n.php files, and keeps what people wrote. Its translation memory lives in the site's database, so a text translated once is not sent to a provider again.
wp i18n make-pot wp-content/plugins/shop wp-content/plugins/shop/languages/shop.pot
wp icu-i18n sync wp-content/plugins/shop --locale=de_DE,fr_FRInstalling
- Without Composer: the zip of the latest release, uploaded in Plugins → Add New. It carries its libraries, renamed so that another plugin's copies of them never meet these, and the seven providers; it updates itself from the releases, under Dashboard → Updates, installing a zip only when its SHA-256 is the digest GitHub published.
- With Composer:
composer require eugene-erg/wordpress-icu-i18n-translator.
Activation makes the tables — on every site of a network when activated for it, and on sites made later; wp icu-i18n install makes or updates them where the plugin is loaded without activation. It needs MySQL or MariaDB, as WordPress does.
Providers
Settings → ICU i18n Translator (in the network admin when the plugin is active for a network): for each provider its keys, whether it is used and in what order, and Save and try, which translates "Hello" with what was saved. Keys are kept encrypted with the salts of wp-config.php and never shown again.
Claude, any OpenAI-compatible model (OpenAI, OpenRouter, Ollama…), DeepL, Google Cloud, Azure, Amazon and LibreTranslate are there; requests go through the HTTP API of WordPress (the site's proxy and certificates). The same settings are constants of wp-config.php, which win and lock their fields — keys out of the database:
define('ICU_I18N_DEEPL_KEY', '…');
define('ICU_I18N_PROVIDERS', 'llm,deepl'); // optional: which ones, in this orderThe icu_i18n_translator_providers filter gets them and can add any other — a model through a command-line tool, a provider of yours.
The files
From languages/{domain}.pot, languages/{domain}-{locale}.po is written as msginit writes it: the notes for translators, the references and the php-format flags of make-pot stay. A text a provider translated is marked fuzzy, for review in Poedit or Loco; a text a person wrote is kept. The .mo and .l10n.php files are written anew from each .po, with the machine translations in them, so the site shows them at once. WordPress loads them itself: on a page load the plugin does nothing.
Other layouts and formats: the icu_i18n_translator_patterns and icu_i18n_translator_formatters filters — see the plugin's page.