=== PolyTranslate AI for Polylang === Contributors: almhdy, freemius Tags: polylang, ai translation, automatic translation, translation, translate Requires at least: 6.5 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 6.0.0 License: GPLv3 License URI: https://opensource.org/licenses/GPL-3.0 AI automatic translation for Polylang. Translate posts, pages, WooCommerce, ACF, SEO meta & custom fields using OpenAI, DeepL, Google or OpenRouter. == Description == [Watch PolyTranslate AI in action](https://www.youtube.com/watch?v=C7j_cFFcTTo) **With one click, you can automatically translate:** - Posts and Pages - Custom Post Types - WooCommerce Products, Categories, Tags, Attributes & Brands - Categories and Tags - Custom Taxonomies - AI Custom Fields Translation (ACF, Meta Box, etc.) — Pro - SEO meta data (Yoast, Rank Math, SEOPress, AIOSEO) — Pro - Elementor pages — Pro - Gutenberg block content - Polylang Strings (bulk AI translation) — Pro This plugin enhances Polylang by adding professional AI translation capabilities directly inside the WordPress admin. **This is NOT a standalone translation plugin** - it works exclusively with Polylang to add automatic translation capabilities. == How It Works == 1. Install and configure Polylang. 2. Install PolyTranslate AI. 3. Add your preferred AI provider API key in PolyTranslate AI → Settings. 4. Open the list of the content you want to translate (Pages, Posts, Products, or a taxonomy). 5. On the row of the original item, find the column of the language you want to translate into and click the PolyTranslate AI flag icon (the small language flag next to Polylang's "+" icon). The flag only appears when that translation does not exist yet. There is no Translate button inside the editor. 6. PolyTranslate AI translates the title, content and excerpt, creates the translation, links it to the original, and saves it with the status chosen in Settings → Translation Settings. Your translated content is saved as a normal Polylang translation. == Key Features == - **Per-field Polylang Custom Fields Sync** - Choose which custom fields Polylang syncs. - **Multiple AI Services** - OpenAI, DeepL, Google Translate, OpenRouter - **Smart Language Detection** - Automatically detects source language - **Update Internal Links in Translations** - Automatically update post links to point to translated versions. - **Menu Sync** - Translated menus follow your default language menu automatically (items, order, links and settings). - **Preserve Original Publish Date** - Keep the original post date on translations - **Preserve Original Author** - Keep the original post author on translations - **AI Custom Fields Translation (Pro)** - All field types including repeaters - **Meta Box Fields (Pro)** - Complete Meta Box plugin support - **Any Custom Fields (Pro)** - Universal custom field translation - **Elementor Page Translation (Pro)** - Full page builder support - **AI Bulk Translation (Pro)** - Translate hundreds of posts at once - **Bulk AI Translation of Polylang Strings (Pro)** - Translate all registered strings in bulk - **AI SEO Meta Translation (Pro)** - (Yoast, Rank Math, SEOPress, All in One SEO Pack) == FREE vs Premium == The **Free version** includes: ✅ Posts & Pages Translation ✅ Custom Post Types Translation ✅ WooCommerce Products Translation ✅ WooCommerce Categories, Tags, Attributes & Brands ✅ Categories, Tags & Custom Taxonomies Translation ✅ Gutenberg Block Content Translation ✅ Update Internal Links in Translations ✅ Per-field Polylang Custom Fields Sync ✅ Menu Sync ✅ Preserve Original Publish Date ✅ Preserve Original Author ✅ Register Polylang Strings ✅ Unlimited Translations ✅ Multiple AI Services (OpenAI, DeepL, Google, OpenRouter) ✅ Language Auto-Detection The **Premium version** includes: ✨ Everything in Free, plus: ✨ AI Bulk Translation ✨ Bulk AI Translation of Polylang Strings ✨ AI Custom Fields Translation (ACF, Meta Box, etc.) ✨ AI SEO Meta Translation ✨ Elementor Page Translation ✨ Priority Support ✨ Automatic Retranslation Detection [How to Configure Api Settings](https://www.youtube.com/watch?v=5JHaU3IGB3o) [Translate ACF & Custom Meta Fields in WordPress](https://www.youtube.com/watch?v=9Hx3v5b_Tbc) == External Services == PolyTranslate AI connects to third-party translation APIs when you trigger translations. **You control your data and costs** by providing your own API keys: 1. OpenAI - Links: [Terms](https://openai.com/policies/terms-of-use) | [Privacy](https://openai.com/policies/privacy-policy) 2. DeepL API (Free and Pro) - Links: [Terms](https://www.deepl.com/pro-license/) | [Privacy](https://www.deepl.com/privacy/) 3. Google Translate API - Links: [Terms](https://policies.google.com/terms) | [Privacy](https://policies.google.com/privacy) 4. OpenRouter.ai - Links: [Terms](https://openrouter.ai/terms) | [Privacy](https://openrouter.ai/privacy) **This is a third-party addon for Polylang - not affiliated with or endorsed by Polylang.** == Installation == **⚠️ PREREQUISITES: You MUST have Polylang installed first!** **Quick Start (5 minutes):** 1. **Install & Configure Polylang** - Install [Polylang](https://wordpress.org/plugins/polylang/) if you haven't already - Go to Languages → Settings in your WordPress admin - Add your site's languages - Configure URL structure and language switcher 2. **Install PolyTranslate AI Addon** - Go to Plugins → Add New - Search for "PolyTranslate AI" - Click Install & Activate - (Or upload manually to `/wp-content/plugins/polytranslate-ai/`) 3. **Configure Translation API** - Go to **PolyTranslate AI → Settings** - Choose your preferred translation service - Add your API key (OpenAI, DeepL, Google, or OpenRouter) - Save settings 4. **Start Translating** - Go to Pages, Posts, Products, or the taxonomy list - Make sure the language columns are visible in Screen Options - On the original item's row, click the PolyTranslate AI flag in the target language column - Wait for the translation to finish, then open the new translation to review it [How to Configure Api Settings](https://www.youtube.com/watch?v=5JHaU3IGB3o) [Translate ACF & Custom Meta Fields in WordPress](https://www.youtube.com/watch?v=9Hx3v5b_Tbc) == Frequently Asked Questions == = Does this work without Polylang? = **No.** This is an addon that adds automatic translation to Polylang. You must install and configure [Polylang](https://wordpress.org/plugins/polylang/) first. Without Polylang, this plugin will not function at all. = Why do I need both Polylang and this addon? = **Polylang** handles the multilingual structure (language management, URL structure, language switcher, manual translations). **PolyTranslate AI** handles automatic content translation (AI-powered translation using OpenAI, DeepL, or Google). = Is this an official Polylang product? = No. This is an independent third-party addon created to work with Polylang. We are not affiliated with or endorsed by the Polylang team. We simply integrate with their excellent language management system. = Will this work with Polylang Pro? = Yes! This addon works with both the free Polylang and Polylang Pro. It extends either version with automatic AI translation capabilities. = Is this plugin completely free? = The core plugin is free with powerful translation features. Premium features (ACF fields, bulk translation, advanced SEO support) require a license, but you'll still save thousands compared to traditional translation methods. = Can I translate Advanced Custom Fields? = Yes! The premium version fully supports ACF fields including text, textarea, WYSIWYG, repeater fields, and more. Also supports Meta Box and other custom field plugins. = Is there a restriction on how many languages I can translate? = No. You can translate to as many languages as you want. Polylang handles the language management, and this addon translates content between those languages. = What happens if I uninstall the plugin? Do all translations get lost or are they still there? = All translations will still be there. This plugin only adds automatic translation capabilities. Once content is translated and saved, it becomes part of your WordPress database just like any other content. = Where do I start a translation? = Go to Pages, Posts, or Products. Make sure the original item has a language assigned in Polylang and the language columns are visible in Screen Options. On the row of the original item, click the PolyTranslate AI flag in the column of the language you want to create. The flag only appears when that translation does not exist yet. There is no Translate button inside the editor. If you already created an empty translation manually, remove it first so the flag reappears. = Does this plugin support the classic editor? = Yes. Translation is not tied to the editor: PolyTranslate AI translates the saved title, content and excerpt, so Gutenberg and the Classic Editor both work. Translation is started from the content list, not from a button inside the editor. = Is my content secure? = Absolutely. Your content goes directly from your site to your chosen AI service using your API keys. We never see, store, or have access to your content or API keys. = Can I translate WooCommerce stores? = Yes! Both free and premium versions support WooCommerce products. The free version also includes categories, tags, attributes, and brands. Premium adds advanced WooCommerce SEO meta translation. = Does it work with page builders? = Premium version supports Elementor fully. Gutenberg works out of the box. Other page builders work for basic content - contact us for specific compatibility questions. = How does Menu Sync work? = Go to **PolyTranslate AI → Settings → Menu Sync** and turn on the menu locations you want to keep in sync. Every menu assigned to your default language becomes the reference: items, order, nesting, links, CSS classes, icons and any other menu item setting are mirrored into the menus of the languages you select. Two things worth knowing: * Page, archive and taxonomy items show the translated title from WordPress. Custom links keep the label from the reference menu. Once you edit a label in a translated menu, your text is kept and is not overwritten on later syncs. * Items without a translation, or whose translation is still a draft, are skipped and listed on the same screen as "waiting for translation" or "waiting for their translation to be published". After the translation is published, save the menu again (or click Sync now on the same screen) and the item appears. == Screenshots == 1. OpenAI API Settings. 2. OpenRouter API Settings. 3. Single translation from the content list. 4. AI Bulk Translation. == Changelog == = 6.0.0 = * **NEW**: Per-field custom field behavior. Every custom field now has its own choice of Default, Sync, Copy once, Don't copy, or Translate (Pro), set from Advanced Settings for each post type and taxonomy. Translate copies the field once, then translates it with AI. * **NEW**: Bulk apply a behavior to every field in a table at once, with optional multi-select exceptions. * **NEW**: Per-field Polylang custom field synchronization for posts and terms, available in both Free and Pro. * **IMPROVED**: Custom field handling for existing installs is migrated automatically. Fields previously marked as translatable become Translate. * **IMPROVED**: ACF protected `_field_name` rows are hidden from Advanced Settings; the public field row remains the one you edit. * **IMPROVED**: Clearer settings screens, with a Polylang status badge, language count, and a consistent "AI …" naming for Pro features. * **IMPROVED**: The behavior controls in Advanced Settings have clearer labels for screen readers. * **IMPROVED**: Advanced Settings tables sort and group by the chosen behavior and stay readable while filtering. * **IMPROVED**: Advanced Settings table groups can be collapsed and expanded by clicking a group header. * **IMPROVED**: Saving Advanced Settings stores only the fields currently shown, so hidden fields and fields outside the scan limit no longer keep old choices. * **IMPROVED**: Advanced Settings hides internal WordPress, SEO, builder, and multilingual fields while keeping content fields such as SEO focus keywords and image alt text available. * **IMPROVED**: Updated bundled translations and fixed plural forms in Arabic, German, Spanish, French, Portuguese, and Russian. * **FIXED**: Real ACF field keys (including subfields) are never sent to the AI translator, even when the field is set to Translate. Values that only look like `field_…` are still translated. * **FIXED**: AI-translated custom field values keep their backslashes. * **FIXED**: `_wpb_` custom fields are visible in Advanced Settings. * **FIXED**: Rank Math score fields are excluded from the custom field lists. * **FIXED**: oEmbed cache fields (`_oembed_*`) are no longer copied to translations; WordPress regenerates the cache when needed. * **FIXED**: `_wp_old_date` and Yoast SEO `_yoast_wpseo_linkdex` / `_yoast_wpseo_wordproof_timestamp` are no longer copied to translations. = 5.5.0 = * **NEW**: Translation status filters for taxonomy term lists, with an "Untranslated in …" option per language * **IMPROVED**: A new translation gets its language and translation group as soon as it is created, so SEO plugins build indexables with the correct language and permalink * **FIXED**: Custom fields are copied once and no longer duplicated on the source post, and internal fields (outdated/sync flags, edit locks, SEO primary-term and score data) are no longer copied to translations * **FIXED**: Elementor data and serialized custom fields keep their backslashes when copied * **FIXED**: Creating a translation no longer unlinks the other languages already in its translation group * **FIXED**: The new translation is deleted instead of left orphaned when Polylang cannot link it to its source * **FIXED**: Translation status filters in post lists now work with Polylang's untranslated filter and add a "Needs update" option * **FIXED**: Long meta keys are no longer cut off in the meta settings table = 5.4.0 = * **NEW**: Translation status filters in post lists to find untranslated posts and posts that need an update * **IMPROVED**: Redesigned translation progress loader with a clear message, a timer and a progress counter * **IMPROVED**: Bulk Translate scrolls to the target language selector when clicked * **IMPROVED**: Updated default AI models (OpenRouter Gemini 3.5 Flash Lite, OpenAI GPT-4.1 mini) * **IMPROVED**: Updated translations * **FIXED**: Translation Settings no longer enable every option by themselves on the first save * **FIXED**: Register Strings no longer turns the first saved word into an array, and its cache is cleared on the first save * **FIXED**: aria_label attribute values are now translated = 5.3.3 = * **FIXED**: Translation is now aborted with an error message instead of creating a translation with untranslated content when the AI response is invalid * **FIXED**: Custom AI Prompt instructions now take priority and no longer prevent translation of image alt/title attribute values * **IMPROVED**: Premium features (Bulk Translation, SEO Meta, Bulk Polylang Strings, Automatic Retranslation) are now enabled by default * **IMPROVED**: Updated translations = 5.3.2 = * **FIXED**: "Fill with AI" not detecting the fields on the Polylang Strings translations page in newer WordPress versions. = 5.3.1 = * **FIXED**: Fatal error when activating the premium version while the free version is active. = 5.3.0 = * **NEW**: Menu Sync - translated menus follow your default language menu automatically (items, order, nesting, links, item settings) * **NEW**: Arabic (العربية), German, Spanish, French, Portuguese (Brazil) and Russian translations added * **IMPROVED**: All admin and AJAX messages are now translatable * **FIXED**: Admin language is now kept in AJAX requests = 5.2.0 = * **NEW**: Option to Custom AI Prompt * **NEW**: Option to Preserve Original Title = 5.1.3 = * **FIXED**: show translate flags when no default-language original exists = 5.1.2 = * **FIXED**: Remove Polylang requirement = 5.1.1 = * **FIXED**: Polylang dependency slug to Polylang Pro = 5.1.0 = * **NEW**: Add automatic retranslation detection option * **IMPROVED**: update plugin translations * **IMPROVED**: Remove default language on bulk translation * **IMPROVED**: style improvements = 5.0.2 = * **IMPROVED**: Compatibility with WordPress 7.0 * **NEW**: option to enable string replacement on default language = 5.0.1 = * **FIXED**: Referer header added to AI connection requests on google * **NOTICE**: Model selection tips added to API tab * **IMPROVED**: Support most of Essential Addon fields. = 5.0.0 = * **NEW**: Move Categories, Tags & Custom Taxonomies translation to Free version * **NEW**: Move WooCommerce categories, tags, attributes & brands translation to Free version * **NEW**: Move Preserve publish date & author options to Free version * **NEW**: Move Polylang register strings to Free version * **NEW**: API connection test handler & endpoint in settings page * **IMPROVED**: Bulk translation now continues on partial failures * **SECURITY**: Capability check updated from edit_posts to publish_posts * **FIXED**: Multiple translate links on same page * **FIXED**: Broken link in row action * **FIXED**: Source title sent as array instead of string * **FIXED**: Fatal error when WooCommerce is inactive * **FIXED**: Incomplete AJAX response in translation handler * **FIXED**: Table header markup in advanced settings tab = 4.1.0 = * **FIXED**: Nested array translation in block attributes * **FIXED**: JSON code handling in block attributes * **FIXED**: Duplicate space in Google API calls * **FIXED**: Redundant translations between block attributes and HTML blocks * **IMPROVED**: Enhanced styling and performance = 4.0.0 = * **NEW**: Automatic translation for polylang strings * **NEW**: Option to register strings to polylang * **IMPROVED**: Link target translation functionality = 3.0.2 = * **FIXED**: Translation of content containing special characters * **IMPROVED**: Block attributes translation for better Gutenberg compatibility = 3.0.1 = * **FIXED**: Could not extract translation array from response = 3.0.0 = * **NEW**: Option to Preserve original publish author * **NEW**: Smart batch translation for long content to prevent timeouts * **NEW**: Reduced API cost by sending visible text only * **NEW**: Rank Math focus keyword translation * **IMPROVED**: Faster translation processing for large content * **FIXED**: Gutenberg compatibility issues = 2.2.0 = * **NEW**: Added option to preserve original publish date = 2.1.3 = * Fixed Bugs * Work with deepL free and Pro * Fix DeepL issue with Gutenberg editor = 2.1.2 = * Fixed: Compatibility with latest Polylang version * Fixed Bugs = 2.1.1 = * Fixed Bugs * Enhanced security = 2.1.0 = * **NEW**: Add seo meta title translation support * Fixed Bugs = 2.0.5 = * Fix Skip Polylang language switcher links = 2.0.4 = * Fixed Bugs = 2.0.3 = * Fixed Bugs = 2.0.2 = * **NEW**: Add Translate Link Targets = 2.0.1 = * Fixed Bugs = 2.0.0 = * **NEW**: Advanced Custom Fields (ACF) complete integration - translate all ACF field types * **NEW**: Meta Box plugin support - translate Meta Box custom fields * **NEW**: Universal custom fields translation - works with any custom field plugin * **NEW**: Enhanced bulk translation with progress indicators * **IMPROVED**: Faster translation processing for large content * **IMPROVED**: Better error handling and user feedback * **FIXED**: Minor UI improvements and bug fixes = 1.1.0 = * NEW: Added compatibility for translating Elementor pages * IMPROVED: Enhanced WooCommerce product translation * FIXED: Various stability improvements = 1.0.0 = * Initial release with OpenAI, DeepL, Google Translate, and OpenRouter support * Free translation for posts, pages, and WooCommerce products * Premium features for taxonomies and SEO plugin integration