=== TranslateWP ===
Contributors: codesnippetspro, 0aksmith, alberttarress, joanrodas, johnpixle
Donate link: https://translatewp.ai/
Tags: translation, multilingual, language switcher, localization, ai translation
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.10.21
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

AI translation for WordPress, without artificial limits. Unlimited websites, unlimited languages, zero word-count billing.

== Description ==

TranslateWP translates your site with AI that understands context, tone and idiom rather than swapping words one at a time. A page is translated on demand the moment a visitor asks for it, and TranslateWP can also prepare pages ahead so the first visitor does not wait. No word-count invoices.

Translations follow your content. Edit your source page and the translated version is brought up to date. No stale copies, nothing to re-run by hand.

Built by the team behind Code Snippets, trusted on over a million WordPress sites.

= Your site translates itself, exactly when it needs to =

You do not have to convert your whole site into every language before a single visitor has read a word. A page is translated the first time it is requested in a language, and TranslateWP can prepare pages ahead of time as well. Each translation is stored, so every visitor after that is served it instantly, with no further AI generation.

= Teach the AI your vocabulary with Lexicon =

Every brand has words that should never be guessed: product names, industry terms, phrases you always say one way. Lexicon lets you pin exactly how each term is translated, in each of your languages, so the AI stays on brand everywhere. Your rules overrule the AI.

= Stay in control =

* A dashboard with every language and its translation coverage at a glance.
* Tune how the AI writes with simple controls for tone, formality and creativity.
* Flexible language switchers: a floating switcher and a classic widget in Free; the [twp-languages] shortcode and the block are Pro.
* Always current: update your source page and the translations follow.
* Install and go: no DNS changes, no migration, no per-post workflow. Activate and pick your languages.

= Privacy friendly =

Page content is translated and cached by the TranslateWP service. Visitor personal data never leaves your site: no customer details, no form submissions and no order data are sent to us.

This plugin connects to the TranslateWP translation service to generate and serve translations. Site content used for translation is sent to that service when you translate or scan pages. See the Privacy section below.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/translatewp` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Open **TranslateWP** in the admin menu and complete the setup wizard.
4. Add target languages and configure the language switcher as needed.

== Frequently Asked Questions ==

= Do you charge per word or per translation? =

No. There is no word-count billing at all. You are not metered on how much content you translate.

= How is this different from pre-translation plugins? =

They translate every page into every language up front and leave you to manage all the copies. TranslateWP translates a page on demand when a visitor requests it and can also prepare pages ahead, so there is nothing you have to build or keep in sync by hand, and translations follow your edits to the original.

= What happens when I edit a page after it is translated? =

The translation updates with it. TranslateWP notices that the source changed and translates the page again, so your other languages stay in step with your source content automatically.

= Will it slow my site down? =

The first request in a new language is translated and cached. Every visitor after that is served the stored version, so ongoing performance is normal.

= Does it work with my theme and page builder? =

TranslateWP translates the rendered text of your pages, so standard Gutenberg and classic theme content is detected and translated. Builders output rendered text too, so standard builder content should be picked up; formal testing across builders is still in progress.

= Does this plugin require an external service? =

Yes. AI-assisted translation is provided by the TranslateWP API. The free plugin uses that service to translate content.

= Page cache exclusions =


The `lang` query parameter selects the rendered language. Page caches must not strip or normalize it, and must not serve a cached default-language page for a `?lang=` URL. The plugin sends no-cache headers for non-default `?lang=` requests.

== Privacy ==

When you use translation or scanning features, the plugin may send page content samples, your site host, and home URL to `api.translatewp.ai` so the service can translate content and attribute usage to your site. No data is sent until you use those features or complete setup that registers the site with the service.

Service terms: https://translatewp.ai/terms. Privacy policy: https://translatewp.ai/privacy

== Changelog ==

= 0.10.21 =
* Bought Pro but not installed it yet? The dashboard, the last setup step, the header and the language menu now offer Install now, never an upgrade, and the dashboard welcomes a site to Pro once with what it unlocked.
* Settings save on change with a Saved message; the Save changes bar is gone. A change that retranslates the site asks first and says how many pages in how many languages that is, with no token figure.
* The closed switcher shows the selected language's flag and native name by default; Icon only and Flag only stay available. Settings > Switcher previews the chosen type and shows where the switcher appears, with a Reset position action.
* Native select keeps the admin language menu and edit mode. Saving switcher settings clears page caches.
* The nav-menu switcher item is removed. The Language Switcher block, the button toggle and the shortcode are Pro placements; the classic widget and the floating switcher stay free.
* The setup wizard shows one readiness figure that matches the dashboard and keeps it when a refresh fails; the Read my site step shows its own progress per line and offers Scan again; the site context proposal finishes inside the wizard's wait; the wizard suggests your own language first.
* The translation step says plainly that setup can finish now and that the Indexing tab shows progress per page.
* The Overview previews each language with a flag button, and reading the site again asks first.
* Notices dismiss for good, the scheduled-tasks notice stays on TranslateWP pages, and a site with a page cache plugin gets guidance.
* The Activity log names the provider error, the page and the language. The Lexicon drawer saves with a Save button and lists terms without HTML entities. A Free site never gets Lexicon terms without your action.
* Content and Behaviour toggles explain what they do; style and tone presets are a compact row with a sample; the Scan website button lines up with the other actions.
* The Translate the site for visitors switch is gone: translation runs wherever the plugin is active, and a site that had it off is told once.
* Deleting the plugin no longer fails or hangs.

= 0.10.20 =
* The free plugin prints hreflang tags for every language, with x-default, and a canonical link for each language. SEO Tools shows these two controls and lists the Pro SEO features.
* A dismissed Lexicon suggestion can be restored as a whole or one translation language at a time, and a dismissed language is marked in the list.

= 0.10.19 =
* Language slugs never clash. A new language takes its short code unless another language already uses it, a save that would repeat a slug is refused with a suggested one, and setup applies the suggestion for you.
* New Regional language names switcher setting: show full names such as American English, or the short name with its region code or flag.
* On multisite, the network admin can lock each group of settings for every subsite, set it as the default, or leave it to subsites, with exceptions for chosen subsites. Locked settings show as Managed by your network admin.
* The TranslateWP page in Network Admin has Overview, Subsites and Settings tabs, and connecting the network ends with a one-time notice for each subsite instead of a stored results list.
* The Overview shows one clear next action for your site, and a site whose setup was not finished picks up where it left off after an update.
* The Indexing page counts pages changed since they were read and can re-read just those.
* Readiness leaves out pages that failed, keeps checking every page on a site nobody has open, and the Overview marks a language ready as soon as one of its pages is.
* A change of plan reaches your site within an hour.
* The switcher's Custom CSS setting is removed. Style the switcher with its appearance settings.
* When a setup step cannot be saved, the wizard stays on the step and says why.

= 0.10.18 =
* From the moment you start checkout until Pro is ready, the Pro area shows each step of your upgrade.

= 0.10.17 =
* Connecting a site that was set up before, or whose pages have not been read yet, reopens setup at the Read site step with your languages filled in.
* The "Connect your site" notice has a Connect this site button, and the "connected" notice no longer comes back when you refresh.
* If you take more than 15 minutes to approve a connection, TranslateWP says so and offers Connect this site.
* Dismissing the warning about another translation plugin is remembered until the set of plugins changes, and its link opens an explanation in Settings > Advanced.
* After payment, the dashboard says Pro is being confirmed and checks again on its own; if Pro cannot be prepared, it offers Try again and Open your account.

= 0.10.16 =
* A translated page no longer flips to pending between readiness checks on sites that skip re-checking text already proven translated.
* The TranslateWP page in Network Admin opens before any site has finished its setup, and connecting brings you back to it.
* Network Admin can connect a single subsite from a chooser next to Connect all sites.

= 0.10.15 =
* A page element that keeps changing to new text, such as a clock or a live counter, is left in its own language instead of being translated over and over, so it no longer sends an endless stream of requests.

= 0.10.14 =
* On phones, the setup progress ring stays round, the translation step scrolls instead of hiding content behind the buttons, and the step bar names only the current step.

= 0.10.13 =
* Setup shows translation as one background status with an overall percentage and a ready mark for each language.
* A page whose translation did not reach the warm cache is repaired only after its translation job finishes, and is sent again rather than read again.
* The Indexing page picks up pages waiting to be read without a click, shows pages being translated again, and checks readiness less often.
* Pages found by visitors are read over the site's own address scheme, so they no longer fail on sites served over http.

= 0.10.12 =
* Translation progress no longer stalls when the service is busy, and pages stay ready while their translations are re-checked.
* Language progress counts only the pages indexing covers, so a page a visitor opened cannot hold a language back from complete.
* Setup lists only the indexed pages, shows each language as ready as soon as one of its pages is translated, and says translation continues after finishing.
* The language step never offers the default language as a translation language and shows every selected language.
* Editor-only edit links are no longer sent for translation, and translated page titles no longer rename pages in the indexed list.

= 0.10.11 =
* Completed pages automatically regenerate any translation or title that did not reach the warm cache.
* Readiness repairs run in the background and immediately while indexing status is open.
* Failed translation rows retry automatically with bounded attempts and keep a clear failure when exhausted.

= 0.10.10 =
* Pages report ready only once their translation is warm and can be served, not when the queue accepts the work.
* A latest posts homepage is read and warmed like any other page.
* The context edited on the languages step is saved there, so finishing setup no longer discards the warm up.
* Onboarding, indexing and the dashboard update readiness live over the translation stream with polling as a fallback.

= 0.10.9 =
* The Network Admin screen now loads its interface and styles on multisite installations.

= 0.10.8 =
* Visitors reloading a page that is still translating are no longer refused with "too many requests", so their untranslated text keeps being queued.
* The Clear translations cache button in Advanced settings works again.
* The unsaved changes bar stays fixed at the bottom of the screen beside the admin menu.

= 0.10.7 =
* The setup wizard makes language selection easier to scan and shows live per-page translation progress while onboarding finishes.

= 0.10.6 =
* Page titles no longer stay "still translating" when several indexing requests run at the same time, and pages already stuck recover on their own.
* The indexed pages list refreshes itself while a page title is still translating.
* Editing a page reads it again and translates the changes, instead of returning its languages to pending.

= 0.10.5 =
* Pending translations keep polling at a capped cadence until they finish or the visitor leaves.

= 0.10.4 =
* Cold translations can stream from the edge and persist in WordPress without blocking visitor requests.
* The setup wizard keeps scan results, context fields, and language lists within its card, with a bounded language list and responsive step labels.

= 0.10.3 =
* The front-end edit menu aligns language flags and action icons, keeps actions on one line, links unavailable actions directly to their destination, and explains how to drag the switcher.
* The menu and notice fade while the switcher is dragged so the page remains visible underneath.

= 0.10.2 =
* Onboarding is one reading step: it reads the site and proposes the context, style and tone in a single pass, with the proposal shown for editing before the languages are chosen.
* The onboarding step shows one progress bar, explains that nothing is translated yet, and keeps the wizard card a fixed size without an inner scroll.

= 0.10.1 =
* Internal source cleanup: register identifiers removed from the shipped code.
* Hydration prefetch scopes its cache reads and writes to the active language.

= 0.10.0 =
* The Dashboard is one surface: today's figures, usage, content and quick settings; Settings has five entries with one save bar and a Discard action.
* Lexicon terms are scoped per language and reach only that language.
* Right-to-left languages set the page direction; the switcher and the tab bars fit phone screens.
* Cancelling a subscription keeps Pro until the paid period ends; the portal picks up a licence cancellation without a new sign-in.
* Switcher settings are checked when saved, disconnecting asks for confirmation, and Reset all plugin data works on a disconnected site.
* Restarting the setup wizard no longer pauses translation for visitors while it is open.
* A settings save from a tab that loaded before another tab saved is refused with a reload offer, so no tab overwrites another's work.
* Saving a change that retranslates the site asks first and states how many segments and about how many tokens it costs.
* Indexing no longer fails on text ending in an emoji at the context limit or on visitor text that looks like markup; a single segment answered without its marker is accepted.
* Headings and labels across the plugin pages read in sentence case.

= 0.9.75 =
* Restarting the setup wizard no longer pauses translation for visitors while it is open.
* The setup wizard's languages heading reads in sentence case.

= 0.9.74 =
* Toggle labels and the default marker read in sentence case.

= 0.9.73 =
* Option labels (Native select, TranslateWP icon, Precision vs fluency) read in sentence case.

= 0.9.72 =
* The switcher color labels carry the same weight as the other field labels.

= 0.9.71 =
* Settings headings and labels read in sentence case throughout.

= 0.9.70 =
* Every form field label in the plugin pages uses the same sentence-case style.

= 0.9.69 =
* The switcher size field labels read in sentence case.

= 0.9.68 =
* The switcher size field labels use the same sentence-case style as the rest of the settings.

= 0.9.67 =
* A switcher size field left empty shows its saved value again as soon as it loses focus.

= 0.9.66 =
* Reset all plugin data works on a site that is already disconnected.

= 0.9.65 =
* Disconnecting the site, or switching to a different account, asks for confirmation first.

= 0.9.64 =
* The switcher colour hint is announced with its field, and the size fields stop at 500 in the form as well.

= 0.9.63 =
* Switcher colours accept hex colours only, and the sizes and styles are checked when saved.

= 0.9.62 =
* Lexicon terms scoped to a language reach only that language.
* A site without Pro re-checks its plan every few minutes, so a purchase shows in the admin promptly.

= 0.9.61 =
* Right-to-left languages set the page direction, on the server and when a visitor switches.
* Arrow keys move keyboard focus with the selection in the language scope tabs.

= 0.9.60 =
* The language scope switcher is shared with the Pro addon through the host bridge.

= 0.9.59 =
* The browser no longer reports translation metrics to the site; the Dashboard reads them from the service and the index.

= 0.9.58 =
* Visitor-reported text that looks like markup now translates instead of failing in the queue.

= 0.9.57 =
* Indexing no longer fails on pages whose surrounding text ends in an emoji or flag at the context limit.

= 0.9.56 =
* The Dashboard reads cache hits and the hit ratio from the translation service, so visitors served from the cache count.
* Context and style text is saved trimmed; whitespace alone is saved as empty.

= 0.9.55 =
* The unsaved changes bar has a Discard action that returns every field to its saved value.

= 0.9.54 =
* The scheduled tasks notice no longer appears while pages only wait for extraction in the admin tab.

= 0.9.53 =
* Translations load from the translate text domain, matching the plugin directory.

= 0.9.52 =
* On phones the floating switcher sits at the bottom corner and opens upward, clear of the theme menu button.

= 0.9.51 =
* Narrow screens: the Dashboard and Settings tab bars wrap, and the style presets stack in one column.

= 0.9.50 =
* Settings: every tab leads with its main input, then the tweaks, then the toggles. Translation reads Context, Style, Content; Switcher ends with its toggles.

= 0.9.49 =
* Dashboard: the setup section is now "Quick settings".

= 0.9.48 =
* Dashboard rebuilt as one surface: a header with the connection line and Index my site, then Today, Usage, Content and Set up sections, every block the same card, one gap throughout.

= 0.9.47 =
* Dashboard: the figures and the usage graphs come first, the language, translation and indexing controls follow, with even spacing. The AI models tab carries the Pro badge only while the account has no Pro.

= 0.9.46 =
* The Lexicon add-term drawer says why Done stays off while the term is blank.

= 0.9.45 =
* Dashboard: the day figures come first, the language, translation and indexing cards follow. Settings: the AI models tab is last.

= 0.9.44 =
* Server-side titles and metadata catch up on every page: the store back-fill rotates through its whole queue instead of stopping at rows the cache cannot answer yet, and gives a row up after a bounded number of passes so the page reads as not translated instead of translating forever.

= 0.9.43 =
* Keep enabled admin panels available while connection status refreshes.
* Show the feature badge until the addon is active.

= 0.9.42 =
* SEO Tools on Free opens with the Pro prompt. An account that already includes Pro but has no addon on the site is offered Install Pro on every locked surface and in the menu, never an upgrade.

= 0.9.41 =
* The admin has five entries: Dashboard (Overview, Indexing, Activity), Lexicon, SEO Tools, Settings (Languages, Translation, Switcher, AI model, Connection, Advanced) and, on Free, Upgrade.
* The Dashboard shows the default language, the translation languages, the translation setup and the indexing progress with a clear path to each setting.
* Changing the default language asks for confirmation, keeps the old default switched off and retranslates once.
* One save bar wherever there are unsaved changes; clearing the cache asks for confirmation.

= 0.9.40 =
* The switcher names each language in its own language (Deutsch, Italiano); a Switcher setting turns this off to show the names in your site's base language.

= 0.9.39 =
* Warm-up indexing yields to text a visitor is waiting on: the service translates visitor requests before the indexer's backlog.

= 0.9.38 =
* Queued page addresses follow the site's current address after a move, so indexing no longer fetches an old host.
* A Pro panel registered after the page's first render replaces the free gate without a reload.

= 0.9.37 =
* On a visit the text in view is served first, top to bottom, then the rest by distance; the service translates it in that order too.
* The plugin's own script and style addresses follow the https request even when WordPress builds them without naming the plugin file.

= 0.9.36 =
* The plugin's own script and style addresses follow the https request even when WordPress builds them without naming the plugin file.

= 0.9.35 =
* Leaving the admin with unsaved language or setting changes asks for confirmation first, so a draft is never dropped silently.

= 0.9.34 =
* The page title is always looked up from the service, so an earlier local copy can no longer keep the tab title in the source language.

= 0.9.33 =
* Selected languages collect as removable chips above the list; the filter clears with one press.

= 0.9.32 =
* A locally stored entry identical to the source text is looked up again instead of served, so a tab title kept from an earlier visit no longer blocks its translation.

= 0.9.31 =
* Add languages in one pass: the Add language drawer lists every language with a checkbox, always open, with a filter above it; the setup wizard uses the same list.
* A language switch that cannot be served returns the page to the source language, title included.
* The Pro install outcome no longer repeats the panel's state line.

= 0.9.30 =
* The Indexing tab unlocks as soon as languages exist, including right after the setup wizard; a restarted wizard ends cleanly.
* The Pages row menu stays disabled while its confirmation dialog is open.

= 0.9.29 =
* The indexer warms the page title, so a language switch finds the tab title in the cache.
* A language switch that cannot be served returns the page to the language its content is in, so the lang attribute never disagrees with what is shown.

= 0.9.28 =
* Behind a tunnel or proxy that terminates TLS, the plugin's own script and REST addresses now follow the forwarded https scheme.

= 0.9.27 =
* A site wrongly marked as rejected repairs itself as soon as the service confirms its credentials; the rejected notice offers Reconnect this site and Connect as a new site.
* The plugin's own script and REST addresses follow the scheme of the current request, so an https site whose stored address is still http keeps its admin app and visitor translation.

= 0.9.26 =
* Opening a plugin page during the setup wizard returns to the wizard with a plain notice instead of a permission error.
* Lexicon terms are limited to 200 characters, with a counter in the form; long terms wrap in the table.

= 0.9.25 =
* Browsers are told not to layer their own page translation over a translated page.
* Confirmations (delete a language, delete a lexicon term, retranslate a page) use the plugin's own dialog; a double click can no longer stack dialogs.
* The public switcher sits clear of the WordPress admin bar for signed-in users.
* The address-changed state offers Reconnect this site and Connect as a new site.
* Visitor polling stops as soon as nothing is pending.

= 0.9.24 =
* The connection state changes only from an explicit answer of the service: a transport failure, a maintenance page, a plugin update, or a difference in scheme, www or trailing slash never disconnects the site, and a later successful status check repairs a wrongly stored state.
* When the site address changes, translation keeps running and the admin chooses to reconnect the site to the same account or to connect it as a new site.
* The Dashboard shows the full connection state right after a connect return, without a reload.

= 0.9.23 =
* The same source text is translated once per language wherever it appears on the site; the segment hash no longer depends on where the text sits in the page. Existing pages refresh through one translation round.
* Served translations with encoded characters render as the character, not the code.
* On a clean-URL site the switcher drops a stale language parameter carried in by a link.

= 0.9.22 =
* A page's title is kept in the translation store even when the page body filled the store first; the tab title is translated on the visitor's language switch.
* The Pages list flags a page whose title has not caught up yet.
* Locked rows for features that are not available were removed from the switcher, context and upgrade screens; row actions name the language; the source language cannot be deactivated; the Lexicon "View all" link works and "Apply now" hides when the list is empty; the AI page is named "AI Models".
* The Dashboard card refreshes right after a successful connect.
* Job events carry the page they belong to; live translation reports the page it runs on.

= 0.9.21 =
* The Dashboard shows real usage: tokens today and this month from your account, translations and translated content from this site, lexicon entries.

= 0.9.19 =
* The indexer and the visitor miss-report path no longer record a WordPress Customizer preview, page-builder preview, or wp-admin/wp-login URL as a page; existing queue rows for such a URL are removed.
* The Pages list shows a page's path instead of its full URL when no title was captured for it.

= 0.9.17 =
* The Indexing pages list collapses duplicate rows for the same page when the URL differs only by scheme, a trailing slash or the `lang` parameter.
* The Pages section shows a brief loading line instead of "Add a target language first" while the warm-up status is still loading.

= 0.9.16 =
* The Indexing pages list reads its target languages from the warm-up status, so the language switcher and page list appear even before the saved language settings finish loading.

= 0.9.15 =
* The Indexing pages list shows one row per page with a language switcher above it, a status filter for failed and pending pages, and per page actions to retranslate in the selected language, retranslate everywhere, or extract again; leftover duplicate rows from earlier warm-up runs are cleaned up.

= 0.9.14 =
* Big pages extract in batches; failed pages show the concrete reason and offer Extract again; Retranslate on a page without segments queues extraction.
* The indexing progress line counts pages and lists target languages; old SEO links open Languages > SEO.
* AI Providers lists only the providers the Pro addon offers.

= 0.9.13 =
* Index my site works from wp-admin again: the admin screens carry the site context and read languages and settings from the saved options.

= 0.9.12 =
* Build with the BYOK row and crawler map shape.

= 0.9.11 =
* AI Providers shows the Pro row for free accounts and hosts the Pro connect flow; provider failures on the Indexing tab show a plain reason.
* Crawler settings load with the right shape on every site.

= 0.9.10 =
* The Indexing tab loads in wp-admin again; the pending translation line clears the moment a page is done and reads the same for everyone.
* A page's translations are kept per page, so a busy site no longer evicts them.

= 0.9.9 =
* A section that fails to load shows the error text so it can be reported.

= 0.9.8 =
* The Indexing tab always loads its sections and shows a message instead of a blank panel if anything fails.
* The mock SEO tab and other placeholder controls are gone; old SEO links open Languages > SEO; Translations tabs follow the URL hash.

= 0.9.7 =
* Indexing has one action, Index my site, with a single progress line; Sync now lives inside the late scheduled tasks notice.
* Retranslate a page and language from the Indexing tab, or everything from Settings, to refresh wrong or stale translations.
* Setup wizard shows step progress, the connected account and language suggestions.
* The AI Providers page is reachable from its short link.

= 0.9.6 =
* Every translation job carries the site name, tagline and page titles as context, so ambiguous words resolve for your site.
* Translated titles render under SEO plugins; the store is read by page.

= 0.9.5 =
* The Indexing tab lists pages that failed to index, with their reason, and adds retry and clear actions.
* The Indexing tab shows a notice when scheduled tasks run late on the site.
* Stale source-language rows are removed so the source language no longer shows as indexing.

= 0.9.4 =
* Translation notices stay hidden from visitors; only site managers see them.
* Miss reports are coalesced and retried, so text-heavy pages translate without hitting the site's own limits.
* Titles, descriptions and social tags translate through the server-side store, filled from visitor views.
* Indexing and back-fill keep progressing on page views when scheduled tasks are late; the source language is never queued.
* Pro panels run on the host bridge; custom style and tone controls render in place; Pro options carry a visible badge.
* Language drawer opens only on demand; tabs follow the URL hash; the Pro capability cache survives cold starts.

= 0.9.3 =
* Setup wizard saves each step as you go and can be restarted from Settings, prefilled with your saved choices.
* New language switcher placements: [twp-languages] shortcode, a native menu item and a classic widget.
* Settings adds a full data reset action and an optional delete all data on uninstall.
* Adding a language starts with nothing preselected.
* Unified brand color across the plugin.
* Admin styles now load only on TranslateWP screens.

= 0.9.0 =
* Initial public beta release.
