AI Website Translation Plugin (WordPress)
The AI plugin translates your entire website: pages, menus, links, SEO tags, theme and plugin strings, and your online store. No need to duplicate anything manually.
See how the translation plugin works SDWSKi Translate is available on this website and in my blog. The following model is deployed and connected for translation: GPT 5.6 sol, as well as Deepl API (free).
SDWSKi Translate is our in-house solution: a WordPress plugin that turns a monolingual website into a multilingual one. It works with the final HTML output, so it does not depend on the theme, page builder, or content structure. Translations are handled by Azure Translator, Azure OpenAI (GPT), or DeepL. Any translation can be edited manually, and your edits will never be overwritten.
At a glance
- 55 languages and regional variants (including en-GB, pt-BR, es-MX, es-AR, Simplified Chinese, and Traditional Chinese);
- 3 translation engines with automatic failover;
- 8 admin tabs and a visual “click the text to translate” editor;
- translations are stored in your website’s database, with no external intermediary services.
How it works
Most multilingual plugins duplicate posts and maintain separate versions of each page. SDWSKi Translate works differently.
- Output capture. When a page is requested in the target language, the plugin captures the final HTML before it is sent to the browser and parses it as a DOM tree.
- Searching for translatable content. Text nodes and attributes are extracted from the tree:
alt,title,placeholder, button labels, as well as<title>, meta descriptions,og:title,og:description,og:site_name,twitter:title,twitter:description. - Translation dictionary. The database contains a separate “source → translation” dictionary table for each language. Known strings are replaced instantly, without requests to external APIs.
- Background translation. New strings are queued, and a background task translates them in batches into all target languages at once.
- Protection against untranslated output. Until the page translation is ready, neither visitors nor search engines will see the source text in the wrong language (see the SEO section for details).
Because the plugin works with the final markup, it can also translate content that conventional methods cannot access: text from theme templates, widgets, buttons, form labels, WooCommerce messages, notifications, and content loaded via AJAX.
Automatic translation mode
Connect your Azure or DeepL key, select the languages, and the plugin does the rest. You pay the provider directly at their rates; the plugin charges no additional fees.
- Azure Translator — fast and affordable machine translation.
- Azure OpenAI (GPT) — context-aware, language-model-level translation: sounds more natural and maintains tone better, but is more expensive and slower. Works through a deployment, for example
gpt-4oorgpt-4o-mini, with a configurable endpoint, key, and API version. - DeepL — a fallback engine. Free-tier keys (
:fx) are detected automatically, and the required API host is used.
Automatic fallback. If the selected engine returns an error (quota exhausted, key expired, or service failure), the plugin automatically tries the next one in the chain: primary engine → Azure Translator → Azure OpenAI → DeepL. Translation continues without administrator intervention. Each engine has a connection test button.
Manual translation mode
All translations can be done manually, without external services or API keys. A visual editor and a table containing all strings are available for this purpose.
Visual translation editor
Open any site page in editor mode: the panel appears on the left, with a live preview on the right. Click any text on the page (heading, paragraph, menu item, button, or image caption), and it will open in the panel.
- source text and translation side by side, with options to select the translation language and a string from the list;
- button Auto — on-demand machine translation of a single string;
- Save / Discard, keyboard shortcuts (
Ctrl+S— save,Ctrl+Alt+стрелки— navigate between strings); - link to the editor in the site's admin panel (admin bar);
- correctly handles clicks in theme dropdown menus, including those with
stopPropagation; - distinguishes identical text on the page (for example, a heading and a menu link containing the same word);
- supports menus in Hebrew, Greek, Hindi, Thai, Georgian, and Armenian.
Table of all strings (“Translations”)
A unified list of all website translations.
- search and filters: all / translated / untranslated / machine-translated / human-reviewed;
- edit directly in the table, save each row individually;
- bulk action Auto-translate selected;
- export to CSV;
- any manual edit is assigned the “Human reviewed” status.
Protecting manual edits
Each translation has a status: untranslated, machine-translated, human-reviewed, error, premium. For strings with the “human-reviewed” status, automatic translation never overwrites, even when run again. Automatic translations are never deleted automatically under any circumstances: all translations belong to you and are stored in your database.
Translatable content
- posts, pages, custom post types;
- titles, text, excerpts, captions,
altfor images; - navigation menus;
- category and tag names and slugs;
- theme and plugin strings (everything that goes through
__(),_e(),_n()); - widgets and dynamic output;
- SEO metadata: Yoast SEO, Rank Math, SEOPress, All in One SEO;
- REST API responses (posts, pages, media, taxonomies);
- frontend AJAX responses;
- Gutenberg Custom HTML blocks are translated in a separate safe pass that preserves the markup.
Language, URLs, and slugs
- language prefixes in URLs:
site.com/es/…,site.com/de/…; - an optional prefix for the default language as well;
- works both at the domain root and when WordPress is installed in a subdirectory;
- slug translation:
/contact/→/es/contacto/, with automatic conversion of the translated URL back to the original before WordPress routing; - translations of slugs for scheduled (future) posts are created when the posts are scheduled;
- forced language insertion into internal links;
- each language can have its own slug. For example, Belarusian: URL
/by/, “BY” badge, while the internal ISO codebefor the API andbein hreflang remain standard; - automatic browser language detection (header
Accept-Language) with a redirect on the first visit and a 24-hour cookie to prevent redirect loops.
Language switcher
- floating button in any corner of the page (4 positions) with a customizable style;
- shortcode
for insertion anywhere, with its own style; - menu item “Language Switcher”: added under Appearance → Menus and expanded into items based on the number of languages;
- display styles: flags + full names, flags + short codes, flags only, names only, codes only;
- названия языков — на родном языке («Español», «Deutsch», «Русский»);
- the language order can be changed by dragging and dropping on the “Languages” tab;
- a built-in flag font ensures that flags display correctly on Windows and Linux, where system fonts do not render flags.
Languages and scripts
- 55 languages and regional variants, including: English (US, UK, Australia), Spanish (Spain, Argentina, Mexico), Portuguese (Portugal, Brazil), Chinese (Simplified, Traditional), Arabic, Hebrew, Hindi, Japanese, Korean, Thai, Vietnamese, Turkish, Ukrainian, Russian, Belarusian, Lithuanian, Latvian, Estonian, Polish, Czech, Slovak, Greek, Persian, Urdu, Esperanto, and more;
- RTL support for Arabic, Hebrew, Persian, and Urdu;
- automatic loading of Noto web fonts for languages not supported by the theme font (Devanagari, Chinese, Japanese, Korean, Arabic, Thai, Hebrew, Georgian, etc.). Instead of empty squares, the text displays correctly. Icon fonts are not affected, and the feature can be disabled;
- regional dictionaries: the plugin further fine-tunes the vocabulary of variants such as pt-PT/pt-BR, en-GB/en-AU, and es-AR/es-MX, ensuring that regional pages are genuinely distinct and are not merged by search engines. Dictionaries can be extended using a filter.
Translation quality and content protection
Machine translation breaks layouts, shortcodes, and brand names. SDWSKi Translate provides multiple layers of protection against this:
- HTML entity and shortcode protection —
©,[shortcode], placeholders%s,%1$s,{name}remain unchanged; - “Do not translate” list: brands, product codes, abbreviations; the site name is protected automatically;
- output validation: placeholders are preserved, the translation uses the correct script, there are no extraneous characters, and protected words remain intact. Invalid output is discarded and retranslated rather than saved;
- retry with brand isolation, if the model corrupted a protected word (for example, Thai truncates “WordPress” by one letter);
- enforced glossary for cases where the model consistently makes mistakes (can be extended using a filter);
- foreign language detection: if the theme has already output text in the visitor's language, the plugin will not treat it as source text or translate and propagate it to other languages;
- API keys, tokens, and hashes are not sent for translation.
Images by language
The “Images” tab lets you replace any image with a localized version, including a logo, infographic, screenshot, or banner containing text. The plugin automatically finds images used on translated pages and adds them to the list, where you can select a version for the desired language from the media library. Replacement also works for src, as well as for srcset.
Roles and access
- separate role Translator (translator): access to the visual editor without access to the site settings;
- permissions
sdwski_translateandsdwski_manage; - all actions are protected by nonce and permission checks.
Language-based visibility
For each post, you can specify which languages it appears in, including the source language. For example, a Russian news item that is not needed on the English version. These restrictions are applied to listings, menus, and the sitemap, while a direct link to an existing post continues to work without returning a 404 error. Nothing changes for posts without restrictions, and the setting is fully backward-compatible.
Meta box in the post editor
The post editor includes a “Re-translate” panel that allows you to restart the translation of a specific post. Language-based visibility is available directly in the editor (both Classic and Block editors).
SEO
Multilingual functionality does not work without SEO, so this is one of the plugin’s core components.
- hreflang in
<head>of each page and in the sitemap, reciprocal links between all language versions andx-default; - separate
<url>for each language in the sitemap, as recommended by Google, with the namespace declared correctlyxhtml; - sitemap integration: WordPress core, Yoast SEO, Rank Math, SEOPress, All in One SEO;
- in
<loc>always the canonical URL of the source language, while/sitemap.xmland/robots.txtnever receive a language prefix; - translation of SEO metadata: title, description, Open Graph and Twitter tags;
- composite
<title>in the format “Post — Site — Tagline” is taken from the rendered page and translated in advance, before the first visit; - correction
<html lang>to the current language and restoration of an empty<title>, if the SEO plugin generated the header before the language was known; - SEO Gate: until the page has been translated into the language, it returns HTTP 503 with
Retry-After,noindexand a neat “translation in progress” placeholder instead of English text in/es/. In archives, on the homepage, and in search results, posts that have not yet been translated are hidden. The placeholder is localized into dozens of languages. If the title still cannot be translated, fail-open kicks in so the page does not remain inaccessible forever; - translation of category and tag names and slugs so that
/pt-br/tag/…was actually in Portuguese.
Integration with WooCommerce
For online stores, the plugin has a separate compatibility layer:
- translation of product names, descriptions, attributes, and variations;
- block-based Cart and Checkout: translation of Store API responses (
/wc/store/v1/*) and block hydration, where data is passed via JSON rather than HTML; - enforce the correct slugs for the store's system pages (cart, checkout, my account, shop) for the primary languages;
- translation of address field labels, regional names, and form text;
- The customer's language is saved in the order, and WooCommerce emails are sent in the language the customer used to make the purchase: confirmations, status updates, refunds, order notes, password resets, subscriptions;
- translation of email bodies (HTML and plain text) and detection of the recipient's language;
- the customer's language is saved upon registration and login and can be changed in their profile (“email language”);
- language ↔ currency mapping when using the WCMC multicurrency plugin: switching languages can switch the currency;
- protection of payment AJAX requests (Stripe, etc.): tokens and the client secret remain untouched;
- removal of internal service wrappers from order notes and metadata.
Known issues with WooCommerce blocks are handled separately: descriptions being truncated in Cart/Checkout for locales with an incorrect translation of the help text, and language detection for Store API requests whose URLs do not contain a language prefix.
Background queue and performance
- Translation runs in parallel for all languages (curl_multi). A site with 10 languages is translated in roughly the same time as one with 1–2.
- Event-driven model: the plugin does not keep “ticking” on a schedule indefinitely. Translation starts only when there is an actual trigger: an author saves a post, a post is scheduled, or a new untranslated string is detected on a page. Once the queue is empty, it stops automatically. No trigger means no paid API requests.
- Protection against unnecessary charges. Retranslation is triggered only when a post is genuinely edited manually in the editor (Classic Editor, Quick Edit, Gutenberg). Programmatic saves by cron jobs, other plugins, imports, and REST integrations do not consume tokens. Changes are detected using an MD5 hash of the content.
- Queue priorities: scheduled posts are translated first, followed by newer posts before older ones.
- Failure resilience: temporary engine failures (timeouts, server errors) do not count as attempts and are retried indefinitely, while permanent failures are limited by a counter to prevent the queue from getting stuck. Memory monitoring and locking prevent concurrent runs.
- Automatic recovery: stuck entries left over from a previous engine failure are automatically returned to the queue on refresh.
- Caching: transients and an object cache group; a single button clears the plugin caches, WordPress, and popular caching plugins (LiteSpeed, WP Rocket, W3 Total Cache, WP Super Cache).
- Process admin panel: progress bars for each language (total, translated, machine-translated, human-reviewed), Start / Stop / Reset buttons, warnings about “stuck” translations with options to retry or ignore them, and “why nothing is running” diagnostics (key, memory, WP-Cron, next run).
- Maintenance tools: cache clearing, glossary repair and duplicate merging, and language cleanup.
Architecture and Reliability
- Clean PHP 8+ architecture: a singleton core and ~27 autoloaded classes, each with its own area of responsibility (rendering, dictionaries, SEO, URLs, WooCommerce, editor, etc.).
- Custom database tables: a dictionary and gettext table for each language, tables for original and replacement images, indexes, and full-text search.
- Protection against duplicate loading of the plugin file, with settings and data migration during updates (including migration of legacy option prefixes).
- Security: nonces for all AJAX actions, permission checks,
wp_unslashand sanitization of all input, prepared SQL statements, secure redirects (wp_safe_redirect). - Compatible with WordPress 6.0+ and PHP 8.0+, tested with WordPress 7.0.
- Licensed under GPL v2 or later; the source code is open for auditing.
- Extensible interface: filters
sdwski_no_translate_xpath,sdwski_translation_glossary,sdwski_regional_dictionary,sdwski_load_webfonts,sdwski_load_flag_font,sdwski_allow_hash_invalidationand more. - Settings page: General, Languages, Machine Translation, Language Switcher, Translation Process, Translations, Images, and Support tabs.
Who it's for
- brochure and corporate websites that need multiple languages without manual duplication;
- media sites and blogs with regularly published content: new posts are translated automatically;
- online stores running on WooCommerce with customers from different countries, including emails and the shopping cart;
- agencies and freelancers delivering multilingual websites to clients: Translator role, manual editing, and export.
Pricing
Plugin updates for two years. You receive the plugin with instructions and install it yourself. You need your own Microsoft Azure Translator or DeepL API key.
Azure account and translation engine
A 2-year license with updates for the duration of the license. I’ll install the plugin, connect the translation service, tailor it to your project, and make sure everything works. All you need to do is provide access to the website.
Azure account and translation engine
Everything included in the “Plugin + Setup” plan, plus unlimited plugin updates and support. Ideal if translation is an important part of your business and the plugin needs to keep working for years.