PerfLocale 1.0.8
- Translated URL bases, Content ReSync, safer machine translation of long posts and less code on every page
Back up your database before updating. How to return to an earlier version
- Security hardening.
- New: translated URL bases. PerfLocale > Settings > URL & Routing > URL Bases translates the base of a post type or taxonomy per language, for example /de/produkte/ instead of /de/product/, including WooCommerce products, categories, tags, attributes and brands; wp perflocale url-bases list|set|compile|forget manages them from WP-CLI. It is off until you tick "Use the translated URL bases" there; nothing changes on a site before that.
- New: a term has a "URL slug in <language>" field (term screen, Quick Edit, REST API, wp perflocale term url-slug); changing a term's slug moves its address and the old address redirects.
- New: a link with an old URL base redirects once to the current base, and a link with a renamed language code or an old slug redirects to the current address.
- New: Content ReSync. "Resync from source" and the bulk "Update translations" bring translations up to date after the original changed and create missing ones, with an estimate first and a Review update screen (Apply, Apply and edit, Reject, Undo). Only changed parts go to machine translation. Content ReSync is off until you turn it on under PerfLocale > Settings > Translation > Content ReSync; while it is off it adds nothing to the site. There you also set what it includes, whether changed and new parts wait for a translator or are machine-translated, the near-match threshold, whether per-language blocks and media are kept, and whether a block a person changed in a translation is always held for review (the default) or held once.
- New: long posts are machine-translated in parts cut between whole blocks or HTML elements (Microsoft Translator, WordPress AI client, and External Agency with batches on or with its new "Maximum characters per request" setting). A post of more than 3 parts is translated by a background job (REST answers 202 with the job id), also for a Translator, in their own languages.
- New: context for machine translation. The Machine Translation settings gain "Context sent with each piece" (Off, Neighbouring parts or Whole section; default Off), the number of neighbouring parts, "Previous translation" and "Maximum context characters per piece". Content ReSync and the translation of outdated strings send this text with each part to DeepL and the WordPress AI client.
- New: machine translation of SEO focus keywords with the new setting "Translate SEO focus keywords" (off by default; Rank Math and Yoast SEO): each Rank Math focus keyword on its own (the list stays comma-separated) and the Yoast SEO focus keyphrase. A keyword edited on a translation is never overwritten. wp perflocale translate --meta-only machine-translates the SEO and other registered fields of existing translations that still hold the original's text and leaves everything else as it is.
- Improved: the machine-translation REST routes and the translate-post ability also translate a post's SEO fields and, with Custom Fields on, its custom fields (Auto-Translate on Publish sends neither); the Create button in the block editor's Translations panel and the Create buttons in the Site Editor follow Auto-Translate on Create; the Machine Translation settings gain an SEO Fields checkbox.
- Improved: for the built-in providers, the machine-translation request limits and the monthly character limit count the characters a provider actually receives, after placeholders and filters; every send and every retry counts, including WordPress AI client calls.
- New: "Show content in default language, not indexed (noindex)" for missing translations, a Site Health test for content without a translation, and a link to the page's own language URL when a translation exists.
- New: built-in country headers (Cloudflare, Amazon CloudFront, server GeoIP) for geo redirect, and European Central Bank daily exchange rates without a key.
- New: Site Health lists posts that share one address in one language, terms whose address no longer matches their slug, and translated URL bases.
- New: after activation, a new site, a Permalinks save or a PerfLocale settings save, a notice lists published top-level posts and pages whose slug is a language code, because visitors of that address get the language instead.
- New: wp perflocale translations delete takes --dry-run and --unlink-only.
- Improved: browser language detection matches the visitor's language and region against each language's locale, so German (Austria) reaches a German (Austria) language whatever its URL slug.
- Improved: PerfLocale needs no PHP extension beyond what WordPress itself needs. It runs without mbstring and iconv: matching of term and post slugs folds the letters of every language in plain PHP, and XLIFF import counts UTF-16 files without them. A REST request with text that is not valid UTF-8 is refused before the length limits (invalid_utf8, invalid_source_text, url_not_utf8).
- Improved: first-visit redirects (browser language, country, edge hint) keep pages cacheable for everyone but a first-time visitor, and a visitor sent through WordPress's own address correction still reaches their country's language; one rule decides per request, new sites check the browser language first, and the reference edge worker follows the site's order.
- Improved: visitor pages and REST requests load less PHP code and send fewer database queries.
- Improved: fewer database statements on activation and update with WordPress 6.4 to 6.8.
- Improved: an export made with 1.0.8 imports into 1.0.7.5, which refuses a file it cannot import safely and then changes nothing. To return to an earlier version, restore the database backup made before updating together with the folder wp-content/uploads/perflocale/; after a database-only restore, delete uploads/perflocale/translations/ and click Regenerate Translation Files under PerfLocale > Settings > Performance (on a network, on each site). After a return to an earlier version, the translations of each post or term saved with 1.0.8 are marked Outdated once.
- Improved: going back to 1.0.7.5 by replacing the plugin files only, without restoring the database backup, leaves some PerfLocale settings rows behind when the plugin is then deleted with data deletion on; to remove them, install and activate 1.0.8 or later, turn on Delete all plugin data when uninstalling in the settings (on a network, on each site), then deactivate and delete it.
- Improved: after the update, a few strings in database mode can show untranslated: strings with a context longer than 191 characters, or whose text was changed by an old import. A notice on PerfLocale's screens and Site Health show how many. Click Scan now (or run wp perflocale db-migrate --user=<administrator>): after the scan, their translations show again.
- Improved: fewer database reads when stock changes on WooCommerce products with language copies (for example at checkout), when a cart asks for several variations of one product with Inventory Sync on, and when a post is saved.
- Improved: when custom fields or the featured image cannot be copied to a new translation, its editor (classic and block) shows a warning that names them, with a "Dismiss this warning" button. A custom field that another plugin refuses on purpose raises no warning.
- Improved: a bulk job lists the note of every row an earlier stopped run left, not only the first (REST redo_notes).
- Improved: the Contact Form 7 integration requires Contact Form 7 5.8 or later; with an older version the Addons screen lists it as Not running.
- Improved: Site Health shows a critical item while the SQLite Database Integration plugin runs its legacy driver, and asks for an update to version 3 or newer.
- Improved: on a network, the update continues in the background over all sites, also sites nobody opens; Retry now or wp perflocale db-migrate starts it again after it ended.
- Improved: the Jobs page lists Exchange-rate sync only while that feature is on, refreshes only running jobs and pauses while its browser tab is hidden.
- Improved: translation files are written per language, smallest first; a language too large for the PHP memory limit is skipped and named in Site Health.
- Improved: uninstall with data deletion on removes the tables, settings and cached values PerfLocale recorded as its own, including ones a newer version added, on every site of a network; other plugins' data stays, including PerfLocale Pro and add-ons. Anything that cannot be removed (an option, an Action Scheduler action, an add-on's data) leaves the uninstall unfinished with the settings kept, so deleting the plugin again finishes it.
- Improved: a background import deletes its uploaded file when it ends or is canceled, keeps it for an hour after a failure so Retry works, and the weekly clean-up of old upload files keeps a file a queued import still needs.
- Improved: only one data import per site can be queued or running at a time, and on a network a staged import file must fit the site's upload space; XLIFF import refuses a file that is too large or saved in an encoding it does not support, with a message that says what to do.
- Improved: the Jobs screen says why a Cancel, Retry or Delete was refused; the Jobs screen, REST API and Site Health apply one permission rule to seeing, cancelling, retrying and deleting another user's job.
- Improved: a database upgrade step that only a person can fix (duplicate rows that block a unique index, missing ALTER and INDEX rights, a key too long for the server) stops its automatic tries and the notice says what to fix; Retry now, wp perflocale db-migrate or an update of the plugin makes the next attempt.
- Improved: a hidden translation or source gives one message, "Ask an editor who can open it", in REST and XLIFF import.
- Improved: bulk tools (Create Page Translations, term tools, Assign languages) skip what you cannot edit and say so; Assign languages continues where it stopped.
- Fixed: an update whose read of the stored database version fails stops and tries again later, instead of treating the site as new.
- Fixed: creating a translation when its existing translation cannot be read no longer creates a second one; the request answers 503 and can be repeated.
- Fixed: the translation link map that pages read could keep an out-of-date entry after a link changed during its rebuild, and a failed read could be remembered as no links.
- Fixed: hierarchical post types and pages load their top-level entries on sites with translations and open nested entries in their own language.
- Fixed: choosing a language in the editor, Quick Edit, WP-CLI or a REST draft gives the post a correct address, with no duplicate address in one language and no needless "-2".
- Fixed: "Create Page Translations" (WooCommerce) keeps the slug, status and title of existing translations.
- Fixed: a WooCommerce product URL whose category part names another category's translated slug no longer redirects to itself.
- Fixed: WooCommerce stock copies stay correct while many orders arrive at once, a database reply is lost, another plugin's code fails while a network site is switched, or another plugin's code changes the same product's stock while PerfLocale aligns its copies; Site Health reports a suspected difference and Check stock repairs it.
- Fixed: a WooCommerce product or variation that is opted out of sync is never changed by the stock mirror or the variation field copy, also when its parent is opted out or in while an order or a save is running.
- Fixed: machine translation never sends text without a letter or digit, style and script elements, templates or comments with markup to a provider; a title, excerpt, custom field, term name or term description with digits but no letter (such as "2026" or "10:30") keeps its original text unless the perflocale/mt/translate_letterless filter sends it.
- Fixed: an import from another site keeps this site's language-code redirects unless the copy box is ticked.
- Fixed: a Replace import removes nothing the file does not list and never replaces a value of this site with an empty one; a Merge import fills an empty media text.
- Fixed: a Replace import completes with the legacy driver of the SQLite Database Integration plugin, and refuses a file that holds a setting value of the wrong type, changing nothing.
- Fixed: a settings field that takes a whole number saves 0 or its default when left empty; a value that is not a whole number is refused with a notice naming the field, and the stored value stays. A save that refused a value says "Other settings saved.", not plain success.
- Fixed: the Translations box in the Contact Form 7 form editor showed without its styles with Contact Form 7 6.2 and later; its stylesheet now loads on the form editor only.
- Fixed: a PHP fatal error when a plugin opens an admin page in an iframe outside the regular admin screens (for example through admin-ajax.php).
- Fixed: the REST route that deletes a translation reports a delete that did not happen as a failure.
- Fixed: Cancel and Retry of one job no longer get in each other's way: a Retry that arrives during a Cancel keeps its queued run. A request that finds the job busy answers 409 perflocale_job_busy (WP-CLI: an error) and changes nothing.
- Fixed: the Polylang import refuses a language whose string translations would exceed the PHP memory limit, names it and reports the import as incomplete; the other languages import.
- Fixed: a resumed XLIFF import or Bulk Translate job tries a failed copy once more before it reports it, and its report names what is still missing.
- Fixed: an update that finished no longer shows as running when two first requests overlap with a shared object cache.
- Fixed: WPML settings are found on servers that store table names in lower case.
- Fixed: Site Health reports a language hostname that belongs to another site of the network as a conflict and advises mapping it to this site.
- Fixed: Rank Math Facebook and X images use the translated image when one is linked.
- Fixed: updating or replacing this version from the Plugins screen no longer ends in a PHP fatal error after the success message.
- Developers: new filters perflocale/url_bases/enabled, perflocale/url_bases/providers, perflocale/url_bases/value, perflocale/url_bases/max_map_bytes, perflocale/fallback/action, perflocale/fallback/serve_in_url_language, perflocale/redirect/clean_marker_hop, perflocale/redirect/max_age, perflocale/redirect/action_args, perflocale/strings/translate_letterless, perflocale/resync/enabled, perflocale/resync/object_types, perflocale/resync/include_object, perflocale/mt/piece_chars, perflocale/mt/interactive_pieces, perflocale/mt/block_splittable, perflocale/mt/include_meta, perflocale/mt/context and perflocale/mt/translate_letterless; GET perflocale/v1/jobs takes include[]. The other new Content ReSync and automation hooks are in the hooks reference.