=== 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.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Real-time AI translation for WordPress. No pre-translation, no word-count billing. Install, pick your languages, and speak to the world.

== Description ==

TranslateWP translates your site in real time, the moment a visitor asks for it, using AI that understands context, tone and idiom rather than swapping words one at a time. No pre-translation runs, no background sync jobs, and no word-count invoices.

Because nothing is translated in advance, nothing falls out of date. Edit your source page and the translated version reflects it on the next request. No stale copies, nothing to re-run.

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

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

Most plugins make you translate everything up front, converting your whole site into every language before a single visitor has read a word. TranslateWP works differently: a page is translated the first time it is requested in a language and stored in cache. Every visitor after that is served the stored version 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, a native menu item, a classic widget, and the [twp-languages] shortcode.
* 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 pre-translate and store a copy of every page in every language, and you manage all of it. TranslateWP translates in real time when a visitor requests a page, so there is nothing to pre-build, nothing to keep in sync, and translations cannot go stale when you edit the original.

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

The translation updates with it. Because pages are translated on demand rather than stored as pre-translated copies, 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.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.
