Machine Translation
Machine translation (MT) lets you auto-translate new posts, existing posts in bulk, or untranslated strings with one click. PerfLocale supports five providers; pick the one that fits your quality + budget + compliance needs at Settings → Translation → Machine Translation.
Providers
- DeepL - best quality for European languages + Japanese. Paid (with a free tier: 500k chars/month). Supports glossaries (native + ours). EU data-residency by default. Start: deepl.com/pro.
- Google Cloud Translation - broadest language coverage (130+). Paid, metered. Google Cloud account required. Higher throughput than DeepL.
- Microsoft Azure Translator - comparable quality to Google; cheaper for high volume; requires Azure account. Custom Translator models supported.
- LibreTranslate - open-source, self-hosted. No per-character cost; you run the server. Quality is decent for EU languages, variable for non-EU. Best for privacy-sensitive or offline sites.
- External Translation Agency - generic HTTP endpoint for sending content to a human-translation service or custom workflow. You configure the URL + auth; PerfLocale sends the payload and receives completed translations asynchronously via a callback URL.
API keys
Every paid provider requires an API key. Two ways to supply one:
- Settings → Translation → Machine Translation - paste into the corresponding field. Stored in the
perflocale_settingsoption. wp-config.phpconstants - preferred for production. Constants take precedence over the setting (so a key stored in the DB can’t accidentally override the env value). See API Key Constants for every supported constant name.
Auto-translate on publish
Toggle Auto-Translate on Publish to trigger MT for every non-default language when a source post is published. PerfLocale creates a translation shell for each language and populates it via the MT provider in the background (Action Scheduler). Failures don’t block the source publish; they’re logged and retryable from the Translations page.
Bulk translate
From the Translations page, multi-select rows and choose Bulk → Translate with MT. Respects the monthly character limit if one is set. For very large batches, use WP-CLI: wp perflocale translate --post_type=post --language=de --limit=1000.
Monthly character limit
Optional cap on MT usage per calendar month. Hit the cap → auto-translate + bulk translate pause until next month (manual translate via the editor button still works, since you’re explicitly opting in). Raises a warning at 80% on the Dashboard.
Glossary integration
Enforce consistent translation of brand names, product SKUs, and industry terms across every MT provider. Toggle Glossary Integration; manage terms at PerfLocale → Glossary. Covered in detail at Translation Glossary.
Translation Memory
PerfLocale caches every translation it produces and reuses exact / fuzzy matches before spending MT credits on the same content twice. Transparent - no configuration required. Inspect via the Translation Memory API.
Privacy
When you trigger MT, the plugin sends the post’s title + content + excerpt to the provider you chose. See the External Services section of the plugin’s readme for each provider’s ToS / Privacy links + what data is sent. For fully-local translation, use self-hosted LibreTranslate.