Machine Translation
Translate content instantly with leading MT providers, then refine with human review.
Multiple Providers
Connect to DeepL, Google Translate, Microsoft Translator, self-hosted LibreTranslate, a custom external-agency endpoint, or — on WordPress 7.0+ — the WordPress AI Client. Switch providers anytime without losing existing translations.
We bake fresh sourdough every morning — come and try our award-winning artisan loaves.
- Deutsch empty
- Français empty
- Español skipped
Auto-Translate on Publish
When you publish or create content, PerfLocale automatically sends it for machine translation. Results are saved as drafts for human review.
- Editor OK
- runaway-script.php throttled
perflocale/mt/rate_limitUsage Controls
Set monthly character limits to control API costs. PerfLocale tracks usage and stops when the limit is reached. The hosted provider endpoints (DeepL, Google, Microsoft) are fixed HTTPS URLs; a self-hosted LibreTranslate or custom agency endpoint uses whatever URL you enter, so give it an HTTPS one. A per-user hourly cap (500/hour by default, filterable) protects your budget from runaway scripts.

Block Editor Integration
A PerfLocale dropdown in the Gutenberg block toolbar for paragraph, heading, quote, list item, button, and code blocks. Four actions on the selected block:
- Translate with MT - send the block to any target language without leaving the editor. Backed by
POST /block-translate. - Fill in from source - pull the matching block’s text straight from the source-language post, no provider call. Backed by
POST /block-translate/from-source. - Wrap in “Show If Language” - turn the block into a language-conditional section in two clicks.
- Mark “Do not translate” - flag the block as untranslatable; machine-translation preserves it verbatim and emits
data-perflocale-skip="1"on the rendered HTML.
// Pick "WordPress AI Client" in
// PerfLocale → Settings → Addons
// → Machine Translation.
// PerfLocale routes every translation through
// whatever AI provider the host has wired up
// (OpenAI, Anthropic, local Ollama, …)
// — no new API key, no per-vendor settings.
// Override per-request:
add_filter(
'perflocale/mt/wp_ai_client_args',
fn( array $a ) => array_merge(
$a,
[ 'provider' => 'anthropic',
'model' => 'claude-opus-4-7' ]
)
);WordPress AI Client Provider (WP 7.0+)
On WordPress 7.0 and later, the new WordPress AI Client provider delegates translation to whatever AI provider the host site already has configured under core's AI Client abstraction. No second API key, no separate billing dashboard — your translations and your other AI features share one provider.
The provider is feature-detected: it only appears in the dropdown when wp_ai_client_prompt() is available and wp_supports_ai() returns true (so a host that disabled AI per-request via the WP_AI_SUPPORT constant or the wp_supports_ai filter is respected), or when a custom resolver is registered via perflocale/mt/wp_ai_client_resolver. The plugin's placeholder masker still gates every response so brand names and printf tokens survive the round trip — same integrity guarantee as DeepL / Google / Microsoft.
LLM-driven translation often handles idioms, register, and brand voice better than dedicated MT engines for marketing and long-form content; it's slower per call but reuses the AI quota you already pay for. See the WP 7 hooks reference for prompt, args, and capability filters.
// Already entered your DeepL key in
// another plugin's Connector?
// PerfLocale picks it up automatically.
// Priority chain:
// 1. environment variable
// 2. PHP constant (wp-config.php)
// 3. WordPress Connectors API ← new
// 4. database (admin form)
// Extend to keys your own site registers
// (e.g. a GeoIP provider you wired up):
add_filter( 'perflocale/connectors/slug_map',
fn( array $m ) => array_merge( $m, [
'my_geo_provider_key' => 'my-geo-service',
] )
);Connectors API key sharing (WP 7.0+)
When WordPress 7.0's Connectors API is present, PerfLocale resolves MT API keys (DeepL, Google, Microsoft, LibreTranslate) through Connectors first — before falling back to the database value. Users who've already registered their key in another plugin's connector reuse it without re-typing, and rotation happens in a single place.
Source priority stays predictable: environment variable > PHP constant > Connectors API > database. Empty connector values are treated as “not set” so an explicitly-defined-but-empty connector doesn't shadow a real DB value. The default map covers the four MT-provider keys, and it's filterable — so any additional key setting your site registers (a GeoIP provider token, a currency-feed key) can route through Connectors too.