跳到内容

PerfLocale

v1.0.8.0.1

аlex · 2026年8月31日 上架

Translate posts, pages, products, categories, strings and URL slugs. Language URLs, hreflang, a language switcher and optional machine translation.

正在使用
10 以下
评分
5.0 / 5
累计下载
1,424
最近更新
2026年11月22日
2 条评价需要 WordPress 6.4+已测试到 7.1.5PHP 8.1+

贡献者

截图

Front-end language switcher - block, shortcode, or template tag, plus an optional append to classic theme menus
Front-end language switcher - block, shortcode, or template tag, plus an optional append to classic theme menus
WooCommerce cart in German - translated product titles, attributes, and currency
WooCommerce cart in German - translated product titles, attributes, and currency
PerfLocale dashboard - per-language translation progress for every post type, with draft and outdated counts
PerfLocale dashboard - per-language translation progress for every post type, with draft and outdated counts
Settings - Export & Import: bring existing translations across from WPML, Polylang, or TranslatePress as a background job that is safe to re-run
Settings - Export & Import: bring existing translations across from WPML, Polylang, or TranslatePress as a background job that is safe to re-run
Languages screen - add languages, set the default, and mark text direction
Languages screen - add languages, set the default, and mark text direction
Settings - Performance: string-translation mode (files or database), object cache, and slug preloading
Settings - Performance: string-translation mode (files or database), object cache, and slug preloading
Strings screen - translate gettext strings from any plugin or theme, with PO export and import
Strings screen - translate gettext strings from any plugin or theme, with PO export and import
Settings - URL & Routing: missing-translation action and per-language fallback chains
Settings - URL & Routing: missing-translation action and per-language fallback chains

PerfLocale is a multilingual plugin for WordPress. It tries to add as little work to each page as it can: it loads only the code a request needs, reads the links and slugs of a page’s posts together instead of one by one, and keeps what it looked up in memory for the rest of the request. Between requests it keeps them in your persistent object cache (such as Redis) or, without one, in transients.

Features

  • Content translation – posts, pages, any custom post type, taxonomies, and URL slugs, with translation-status tracking. Synced patterns, block-theme navigation menus, and block-theme templates and template parts are translatable too (opt-in)
  • URL routing – subdirectory (/en/), subdomain (en.example.com), per-language domains, or query-parameter (?lang=en) modes; auto-detect from URL, cookie, browser, or an edge/CDN hint
  • String translation – gettext strings from any plugin or theme, file-based (.l10n.php) or database-mode, with CLDR plural rules (6 forms for Arabic, 3 for Russian) and context support. The site title and tagline appear there too
  • Language switcher – block, shortcode, widget, menu, admin-bar, and template tags; the dropdown style can be used with the keyboard
  • SEO – hreflang (HTML + HTTP) and sitemap alternates; integrates with Yoast, Rank Math, AIOSEO, SEOPress, The SEO Framework, and Slim SEO
  • Machine translation – DeepL, Google, Microsoft, LibreTranslate, a custom agency endpoint, and the WordPress 7.0 AI Client, with a monthly character limit
  • Translator role – a role for translation staff: it can create and edit translations and use machine translation. Like WordPress’s editing roles, it can also edit any post or page and upload media, but it cannot publish, delete or change settings.
  • WooCommerce – translate products, variations and attributes; show prices in several currencies, with the European Central Bank’s daily rates or rates from your own provider; keep stock, price and other product data the same across language copies; send order emails in the customer’s language
  • Reliability – calls to translation providers, webhooks, exchange-rate and country sources pause for a while after repeated failures; locks stop two requests from running the same work at once; background jobs continue where they stopped; Site Health shows what needs attention

More for visitors and search engines

A Content-Language HTTP header, a data-nosnippet wrapper when a page shows content in another language as a fallback, and optional Speculation Rules prerendering and View Transitions when a visitor switches languages.

Integrations

Each integration loads when the plugin or theme it is for is active: WooCommerce, Elementor, Beaver Builder, Bricks, Oxygen (Classic and 6), ACF, Meta Box, Pods, Gravity Forms, WPForms, Contact Form 7, Yoast SEO, Rank Math, AIOSEO, SEOPress, The SEO Framework, Slim SEO, and the Blocksy, Kadence and Neve themes.

For developers

More than 200 action and filter hooks, a REST API, WP-CLI commands and a documented addon system. A PHP helper API lets you translate a string or run a piece of your own code in a chosen language. Classes and methods marked @api do not change in a breaking way within 1.x. Works on multisite. Full docs at perflocale.com/docs.

Try it without installing anything. Open a throwaway WordPress site in your browser with PerfLocale already active: Open PerfLocale in WordPress Playground

Where to go next

Privacy

PerfLocale has no tracking, no analytics and no visitor fingerprinting.

  • Cookie: one cookie, perflocale_lang, stores only the active language slug. HttpOnly, Secure on HTTPS, SameSite=Lax, 365-day default lifetime (filterable via perflocale/cookie_lifetime). It can be turned off (see “Cookieless mode” below) – language routing is URL-based and works without it.
  • Visitor IP: never logged or stored. The optional GeoIP-redirect feature (disabled by default) calls no lookup service and sends the IP nowhere: its built-in sources read the country code that your CDN (Cloudflare, Amazon CloudFront) or your web server’s GeoIP module already adds to the request, and that country code is not cached. If you wire a source yourself through the perflocale/geo/lookup_country or perflocale/geo/providers filter, the IP is passed to that source once per first visit to resolve a country code; the country code is then cached server-side (24 hours by default) under a salted, non-reversible key – an HMAC-SHA256, keyed with the site’s auth salt, of the IP after wp_privacy_anonymize_ip() has zeroed the host bits – never the raw IP or any value reversible to it.
  • WordPress Privacy API integration: Tools Export Personal Data and Tools Erase Personal Data both work. The eraser zeroes created_by on the background jobs the data subject dispatched and deletes their per-user UI-state meta – returning items_removed/items_retained counts. The same flow runs on the admin delete_user path. Full detail in the docs.
  • Consent gating: the perflocale/privacy/consent_given filter lets any consent-management plugin (Cookiebot, Complianz, OneTrust, etc.) hold back PerfLocale until a visitor has consented. When the filter returns false, the perflocale_lang cookie is not set, and the GeoIP and browser-language redirects do not run (no outbound request is made).
  • Cookieless mode: PerfLocale Settings URL & Routing Visitor Redirects “Language Cookie” turns the perflocale_lang cookie off – no consent-management plugin required. Code on your site can still decide per request through the perflocale/language_cookie/enabled filter. URL-based language routing keeps working; you lose “remember my language” on non-prefixed URLs. On a WooCommerce store you also lose the cart and checkout language: the block cart/checkout posts to the non-prefixed Store API URLs, and the language stamped on a new order is read from that same cookie, so both fall back to the site’s default language. The automatic first-visit redirects (browser language, GeoIP, edge hint) do not run in cookieless mode unless code hooks that filter: without the cookie they would redirect the same visitor again on every default-language page.
  • Suggested privacy-policy text: auto-registered via wp_add_privacy_policy_content(). The sections shown adapt to which features are enabled – GeoIP wording only appears if GeoIP is on, MT wording only appears if MT is on.

Full technical detail: perflocale.com/docs/privacy

External Services

PerfLocale can optionally connect to external services for machine translation. All external service calls are disabled by default and require explicit user configuration (choosing a provider and enabling the feature in settings; most providers also need an API key). No data is sent to any external service without your action. The hosted providers below are contacted over HTTPS; for self-hosted or user-configured endpoints (LibreTranslate, agency, webhooks) use an HTTPS URL.

The GeoIP redirect sends no visitor IP address anywhere on its own: its built-in sources read a country code that your CDN (Cloudflare CF-IPCountry, Amazon CloudFront CloudFront-Viewer-Country) or your web server’s GeoIP module already adds to the request, and make no request. Any other geolocation or exchange-rate source is one you wire yourself through the perflocale/geo/lookup_country / perflocale/geo/providers and perflocale/woocommerce/exchange_rates_fetched / perflocale/woocommerce/exchange_rate_providers filters; disclosing that service is your responsibility as the site owner.

API keys for the providers below can be supplied via an environment variable, a wp-config.php constant, or the admin Settings field (see the “Can I keep API keys out of the database?” FAQ).

Machine Translation

When you enable machine translation and configure an API key in PerfLocale Settings Addons Machine Translation, the plugin sends the text you ask it to translate to the selected provider, together with source/target language codes and your API key. That text is: post titles, content and excerpts; taxonomy term names and descriptions; interface strings listed on the Strings screen (which can include strings registered by other plugins and themes) when you use its machine-translation controls; and, when meta translation is enabled, registered meta values such as SEO titles and descriptions or custom text fields. It is sent when you click “Machine Translate” or use the block editor’s translate actions, run a bulk or site-wide translation, translate via WP-CLI or the REST API, or enable auto-translate on publish or on create. Each provider below receives exactly that data, and only for the actions just listed. The provider API additionally defines a connection-test call that sends your API key and, for some providers, a fixed test word – never your content – so an add-on can verify credentials; no screen, WP-CLI command or REST route in PerfLocale itself invokes it.

  • DeepL – api.deepl.com / api-free.deepl.com. Commercial neural-translation API (free and paid tiers). Receives the text, language codes and API key described above.
    Terms of Service | Privacy Policy
  • Google Cloud Translation – translation.googleapis.com. Google’s paid cloud translation API. Receives the text, language codes and API key described above.
    Terms of Service | Privacy Policy
  • Microsoft Azure Translator – api.cognitive.microsofttranslator.com. Microsoft’s paid cloud translation API. Receives the text, language codes and API key described above.
    Terms of Service | Privacy Policy
  • LibreTranslate – self-hosted or user-configured URL. Open-source translation server you host yourself or point at an instance you trust; the plugin calls no hard-coded LibreTranslate endpoint. Receives the text and language codes described above at the URL you configure. Terms of service and privacy policy are governed by the LibreTranslate instance you configure; the AGPL-3.0 linked below is the governing license of the software itself.
    Terms (AGPL-3.0 License) | Source Code
  • WordPress AI Client – no hard-coded endpoint; delegated to WordPress core. When you select the “WordPress AI Client” provider on WordPress 7.0+ (or a host that ships the AI Client feature plugin), PerfLocale builds a short translation prompt (the text described above plus source/target language codes) and hands it to WordPress core’s wp_ai_client_prompt() function. PerfLocale itself makes no outbound HTTP request for this provider: WordPress core (and whichever AI provider you connected under Settings Connectors) performs the network call. The data sent, the destination, and the governing Terms of Service / Privacy Policy are therefore those of the AI provider you configured in WordPress core, only for the actions listed above.
    WordPress AI Building Blocks

External Translation Agency

When you configure an external agency URL in PerfLocale Settings Addons Machine Translation, the plugin sends post content to the configured endpoint for human or agency translation:

  • Custom Agency Endpoint – user-configured URL. A webhook endpoint you configure (use an HTTPS URL) to send post content to a human translator or translation agency for offline processing; the destination is entirely under your control and the plugin calls no hard-coded endpoint. The plugin sends post text, source/target language codes, and a unique request ID, only when you submit a translation request; the agency must return the translated text in the immediate response. Terms of service and privacy policy are governed by the agency whose endpoint you choose to configure; review their public policies before sending post content.

WooCommerce exchange rates

When you turn on Auto-Sync Rates and select “European Central Bank” as the Rate Provider in PerfLocale Settings Addons WooCommerce (or click Sync Now), the site downloads the ECB’s public euro foreign exchange reference rates file on the sync schedule you choose. The request is a plain download: it sends no visitor data, no order or store data and no key, only a PerfLocale user-agent and the usual connection details (the server’s IP address). PerfLocale computes rates against your store currency from that file.

Webhooks

When you register webhooks via the PerfLocale REST API, the plugin sends event notifications to your configured webhook URLs when translations are created, updated, or content changes:

(loopback, private-network and credential-bearing destinations, and ports outside WordPress’s own allowlist of 80, 443 and 8080, are rejected at validation time, and the refusal names the rule that was broken; on multisite, registering one requires network-administrator permissions) Endpoints you register via the PerfLocale REST API to receive translation-lifecycle notifications (use HTTPS URLs); the destinations are entirely under your control and the plugin calls no hard-coded URL. The plugin POSTs the event type, translation data (post IDs, language codes, status), and a timestamp whenever a translation is created, updated, or otherwise changes, and signs each payload with HMAC-SHA256 when a shared secret is configured. Terms of service and privacy policy are governed by whatever destination you register; review the operator’s public policies before registering the URL.

PerfLocale can also publish a read-only public REST endpoint for edge runtimes (/wp-json/perflocale/v1/config). It is served by your own site, makes no outbound third-party request and sends no data anywhere – see the “Does PerfLocale expose anything to edge workers?” FAQ for the full description.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums