=== NOP Translate ===
Contributors: nopdigital
Tags: translation, multilingual, translate, deepl, language switcher
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Translates the whole site into the languages you choose, with a real address per language that search engines index. DeepL, Google or Claude with your own key, paid by use.

== Description ==

Most translation plugins either translate in the visitor's browser, where search engines never see the result, or charge a monthly fee that grows with the number of words. This one translates on your server, gives every language its own address (/en/, /de/, /fr/), and lets you bring the key of the translation service you prefer: you pay the service for the text you translate, at its price, and nothing for the visits.

**What it does**

* Translates every page, post, product, menu and widget into as many languages as you want, from more than forty.
* A real address per language: /en/chi-siamo/ is the English version of /chi-siamo/. No .htaccess changes, no permalinks to regenerate, works with any theme and page builder.
* hreflang for every language and x-default, translated title, description and Open Graph tags, the right canonical, og:locale and html lang on every version.
* Translates whole sentences together with their links and bold text, so the result reads like a sentence and not like a list of fragments. The markup of the page is never rebuilt, so layouts do not break.
* Each sentence is translated once and kept in your database. A page already translated costs nothing, however many people open it.
* A monthly character limit with a counter, so spending never surprises you.
* A language switcher as a floating button, as an item in your theme menu or with the [nopd_translate] shortcode anywhere.
* Optional: open the site in the visitor's browser language on the first visit. Search engines are never redirected.
* Words never translated (company and product names), and anything with the class notranslate stays as it is.
* Pages left in the original language by path, such as /checkout/.
* Translate the whole site in advance with one button, so no visitor waits for a translation.

**Translation services**

* DeepL: the most natural results for European languages. Free plan with 500,000 characters a month.
* Google Cloud Translation: every language, including the ones DeepL does not offer. 500,000 characters a month free.
* Claude by Anthropic: follows instructions about tone of voice and how to address the reader.

The request goes from your site straight to the service. Your text does not pass through our servers.

**Free and Pro**

Translating is in the free version, all of it, with no limit on languages or words. A licence adds control over the result:

* Edit any translation by hand, from the list or straight from the page through the admin bar. Hand edits are never overwritten.
* A different link per language: the brochure button opens the Italian PDF on the Italian site and the English PDF on the English site.
* A different text and link for a single button or element, chosen by CSS class or id.
* Parts of the page left out of the translation, by CSS selector.

**What it does not do**

* It does not translate text that a script loads after the page has arrived (some live search boxes, some chat widgets).
* It does not translate the addresses themselves in this version: the English version of /chi-siamo/ is /en/chi-siamo/.
* It does not include translation credits. You bring the key of the service, and the service bills you.

== Installation ==

1. Upload the plugin and activate it.
2. Open Translate > Languages and choose the languages.
3. In the Engine tab choose DeepL, Google or Claude and paste your key. Test the key with the button below the form.
4. Open your site with /en/ (or another language) after the address. The first visit to each page waits for the service; Tools > Translate the whole site does it in advance.

== Frequently Asked Questions ==

= How much does the translation cost? =

What the service charges for the characters of your site, once. A site of 50 pages of 600 words each is about 200,000 characters per language: inside the free plans of DeepL and Google.

= Does it work with a caching plugin? =

Yes. Each language has its own address, so the cache keeps a copy per language, and the copy is made after the translation.

= What happens if the service is down or the key stops working? =

The pages already translated keep working, from your database. New text stays in the original language until the service answers again, and the panel shows the error.

= Can I keep the keys out of the database? =

Yes: define NOPDTR_DEEPL_KEY, NOPDTR_GOOGLE_KEY or NOPDTR_CLAUDE_KEY in wp-config.php.

= What is kept when I uninstall? =

The translations, because they were paid for and some may have been edited by hand. Define NOPDTR_REMOVE_ALL in wp-config.php before uninstalling to delete them too.

== Changelog ==

= 1.0.1 =
* Yellow identity (#FFC21A) in the panel, as on the product page. The language switcher on the site uses a darker yellow (#B07A00), readable on white.
* "See plans" and "More from NOP Digital" open the new product page, translate-for-wordpress.

= 1.0.0 =
* First release.
