=== Eachlang – Website Translation ===
Contributors: eachlang
Tags: translation, multilingual, translate, hreflang, language switcher
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Translate your WordPress site into other languages under /fr/, /de/ ... with the Eachlang translation service. Same addresses, hreflang included.

== Description ==

Eachlang serves translated versions of your pages at language sub-directories such as `https://example.com/fr/about/`. Your WordPress content stays in one language; the plugin asks the Eachlang service for the translated page and returns it from the same address.

* Translated pages under /<language>/, with `lang`, a self-referencing canonical and links that stay in the visitor's language.
* hreflang links (and x-default) on every page.
* Language switcher: shortcode `[eachlang_switcher]`, a menu location item, or a floating switcher.
* Never translated: wp-admin, REST API, login, feeds, files, WooCommerce cart, checkout and account pages, add-to-cart and wc-ajax requests, and logged-in visitors.
* If the service is slow or unavailable, the page is shown in the site language at the same address (not cached, not indexed), so your site never breaks.
* Page cache friendly: WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and Cloudflare APO.
* Moving from another sub-directory translation plugin: Eachlang detects the existing language list and URL prefixes and can set up the same addresses.

== External service ==

This plugin relies on the Eachlang translation service, operated by Eachlang (https://eachlang.com/). It is required: without it no page is translated.

* When: each time a visitor requests a page under a translated language prefix (for example /fr/...), unless the request is excluded (admin, logged-in visitors, cart, checkout, etc.).
* What is sent: the requested path and query string, the target language, your site address, your public project key and the If-None-Match / If-Modified-Since request headers. No cookies, no logged-in user data and no form data are sent.
* The service then fetches the public source page from your site and returns the translated HTML.
* Terms of service: https://eachlang.com/legal/terms
* Privacy policy: https://eachlang.com/legal/privacy

== Installation ==

1. Upload the plugin and activate it.
2. Go to Settings > Eachlang, paste your public project key (pk_...) from the Eachlang dashboard.
3. Set the site language and the translated languages (for example `fr, de`). Save.
4. Visit `/fr/` on your site.

== Frequently Asked Questions ==

= Are my URL slugs translated? =

No. Translated pages keep the original slug under the language prefix (`/fr/about/`). If you used translated slugs before, the import button on the settings page saves them and the old addresses (`/fr/a-propos/`) redirect permanently (301) to the new ones.

= What happens if the translation service is down? =

The visitor sees the page in your site language at the same address. That response is marked no-store and noindex so caches and search engines do not keep it.

= Can logged-in users see translations? =

Not in this version: logged-in visitors always see the site language.

== Changelog ==

= 0.1.0 =
* First version: /<language>/ pages from the Eachlang service, hreflang, language switcher, cache plugin compatibility, import of an existing sub-directory setup.
