=== Lang Forge – Multilingual, Translation & hreflang SEO ===
Contributors: avakodeforge
Donate link: https://avakode.com/?utm_source=wporg&utm_medium=readme&utm_campaign=langforge&utm_content=donate
Tags: multilingual, translation, language switcher, hreflang, woocommerce
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.30
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Make your site multilingual — translate posts, WooCommerce products and strings, add a language switcher and correct hreflang SEO.

== Description ==

**Lang Forge** is a modern multilingual plugin that handles multilingual URL routing (4 URL formats), manual post and string translation, a language switcher, hreflang SEO, RTL layouts, a glossary, WooCommerce, unlimited languages, and one-click migration from WPML / Polylang / TranslatePress. It ships a REST API and WP-CLI commands and is a drop-in WPML compatibility layer. AI translation is available as the **Lang Forge Pro** add-on.

= Switching from WPML, Polylang or TranslatePress? =

Lang Forge imports your existing setup instead of making you start over. The migration tool reads your current plugin's data and recreates it: translated posts and their language links, string translations, taxonomy translations, and your language URL structure.

The migration is non-destructive. Your current plugin stays installed and untouched until you confirm the result, so you can compare both side by side and roll back if anything looks wrong.

If you are coming from WPML, you can also keep your existing theme and plugin code working unchanged. Lang Forge ships a WPML compatibility layer that implements the functions third-party code expects — `icl_object_id()`, `icl_get_languages()`, `icl_translate()` and others — so integrations built against WPML keep working without edits.

= Free =
* Unlimited languages
* Multilingual URL routing — 4 formats (directory `/fr/`, query `?lang=fr`, subdomain, domain mapping)
* Manual post / page / CPT translation linking
* Manual string translation (auto-registered via gettext)
* Language switcher (widget / shortcode / admin bar)
* hreflang tags with x-default, plus an hreflang sitemap
* Glossary
* WooCommerce product and store string translation
* WPML compatibility layer (`icl_object_id()`, `icl_get_languages()`, etc.)
* REST API + WP-CLI commands
* One-click migration from WPML / Polylang / TranslatePress
* RTL support (ar/he/fa/ur/ku)

= Pro =
* AI translation with translation memory
* Visual editor (side-by-side WYSIWYG translation)
* Frontend translation
* Elementor + ACF integration
* Content diff + Translation QA
* Analytics dashboard
* Import / export PO + XLIFF
* Bulk AI translation, translator roles, media/comment translation, live preview

Part of the **Forge Suite** — bundle includes Rank Forge, Form Forge, Field Forge.

== Third-Party Services ==

Lang Forge connects to the following third-party services. Basic translation, the language switcher, string translation, and hreflang work fully offline with no external calls — data is sent only when you use an AI feature.

* **Avakode API** (https://avakode.com) — powers AI translation and AI quality checks, and validates your license. When you run an AI translation or QA check, the source post content, the target language, your site URL, and your license key are sent. The Avakode API routes AI requests to OpenAI and/or DeepL on your behalf. Terms: https://avakode.com/terms — Privacy: https://avakode.com/privacy
* **OpenAI** (used by the Avakode API to perform AI translation) — Terms: https://openai.com/policies/terms-of-use — Privacy: https://openai.com/policies/privacy-policy
* **DeepL** (used by the Avakode API to perform AI translation) — Terms: https://www.deepl.com/en/pro-license — Privacy: https://www.deepl.com/en/privacy
* **Anonymous usage analytics (opt-in, OFF by default)** — Only if you explicitly opt in from the Lang Forge settings, the plugin sends anonymous product-usage telemetry to the Avakode API (https://avakode.com/telemetry): a random install ID (UUID, not tied to your site URL or any account), your bucketed WordPress and PHP version ranges, the plugin version, and aggregate feature-usage event counters. It is sent ONLY after you opt in and can be disabled at any time. It never sends your site URL, email address, post or form content, or license key. Privacy: https://avakode.com/privacy

== Installation ==

1. Upload `langforge` to `/wp-content/plugins/`, or install via Plugins → Add New.
2. Activate the plugin.
3. Go to **Lang Forge → Settings** and enable your target languages.
4. (Optional) Connect to Avakode for Pro features at **Lang Forge → Connect**.

== Frequently Asked Questions ==

= How do I make my WordPress site multilingual? =

Install Lang Forge, go to Lang Forge → Settings and add the languages you need. Pick how language URLs should look — subdirectories like /fr/, a query parameter, subdomains, or a separate domain per language. From there every post, page and custom post type gets a Language panel where you link or create its translations.

= How do I translate WooCommerce products and categories? =

Lang Forge translates WooCommerce product content, product categories and tags, and store strings such as cart and checkout labels. Open any product in the editor and use the Language panel the same way you would for a post.

= How do I add hreflang tags to WordPress? =

Lang Forge outputs hreflang tags automatically in `wp_head` for every translated URL, including the x-default entry, and generates an hreflang sitemap. No manual markup and no separate SEO plugin configuration needed.

= Can I use a separate domain for each language? =

Yes. Domain mapping is one of the four supported URL formats, alongside subdirectories, subdomains and query parameters. You can point example.fr and example.de at the same WordPress install and Lang Forge will serve the correct language on each.

= How do I migrate from Polylang without losing translations? =

Run the built-in migration tool. It imports your translated posts, the links between them, your string translations and your language URL structure. Polylang stays installed and untouched until you confirm the migration, so nothing is lost if you change your mind.

= Can I migrate from WPML? =

Yes, and your existing code keeps working. Beyond importing your content, Lang Forge provides a WPML compatibility layer implementing `icl_object_id()`, `icl_get_languages()` and related functions, so themes and plugins written against WPML continue to work without modification.

= Will my URLs change if I switch from TranslatePress? =

Only if you want them to. The migration tool reads your current language URL format and reproduces it, so existing links and search rankings stay intact. You can change the format later from Settings if you decide to.

= Does it support right-to-left languages like Arabic and Hebrew? =

Yes. Lang Forge includes RTL support for Arabic, Hebrew, Persian, Urdu and Kurdish, switching text direction and adjusting the admin and switcher layout automatically.

= How do I add a language switcher to my menu? =

The switcher is available three ways: as a widget, as a shortcode you can drop anywhere, and in the admin bar. It can display flags, native language names, or both.

= How do I translate strings from my theme or another plugin? =

Any string passed through WordPress translation functions is registered automatically via gettext and appears in the String Translation screen, where you can translate it per language. No .po file editing required.

= Can I translate my site from the command line? =

Yes. Lang Forge ships WP-CLI commands for listing languages, linking and unlinking translations, importing and exporting translation data, and running bulk operations — useful for staging deployments and scripted workflows.

= Is there a way to export translations to XLIFF or PO? =

Import and export of PO and XLIFF files is available in Lang Forge Pro, for sending content to external translators or translation agencies.

= How many languages can I use on the free version? =

Unlimited. There is no plan-based cap on the number of languages in the free version.

= Does Lang Forge work with my theme? =

Yes. Lang Forge uses standard WordPress hooks — `the_content`, `get_the_title`, hreflang via `wp_head` — so no theme-specific integration is needed.

= Does it work with Elementor and ACF? =

Elementor and ACF field translation is available in Lang Forge Pro. The free version handles standard post content, custom post types and taxonomies.

= Does it slow down my site? =

Basic translation, the language switcher, string translation and hreflang all run locally with no external requests. Nothing is sent anywhere unless you use an AI feature, which is a Pro add-on.

= Is AI translation included in the free version? =

No. The free version covers manual translation of posts, strings, taxonomies and WooCommerce content. AI translation, translation memory and bulk AI translation are part of the Lang Forge Pro add-on.

= How much does AI translation cost? =

AI translations consume Forge Credits (separate from the subscription). One credit ≈ one short paragraph. Credits don't expire.

= Is my content sent to OpenAI? =

Only when you run an AI feature, and only the text being translated. It goes to the Avakode API, which forwards it to OpenAI or DeepL. No personal data, no admin information, no site URLs. See the Third-Party Services section for the full breakdown.

= What is a glossary and when do I need one? =

A glossary locks specific terms to a fixed translation — brand names, product names, industry terminology — so they stay consistent across every translated page instead of varying between passes.

== Screenshots ==

1. Multilingual setup — add unlimited languages, set language codes, display labels, switcher visibility and the default language.
2. Post translation — the Language panel lists every linked translation and creates missing ones in one click.
3. Translation management — a language column on the posts list with per-language filters, counts and translation shortcuts.
4. Multilingual URL structure — choose subdirectory, query parameter, subdomain or domain mapping, and set the language fallback chain.
5. Language switcher — the front-end switcher with flags and native language names.
6. Migration — Lang Forge detects an existing WPML, Polylang or TranslatePress install and imports it without touching the original data.

== Changelog ==

= 1.0.30 =
* Declares support for WordPress 7.1. Checked against 7.1-RC3, where the post editor canvas moves into an iframe for good: the language panel, the admin-bar switcher and the editor scripts all still work, because they read the post through the editor's own data store rather than reaching into the canvas.
* The sibling plugin formerly called SEO Forge is now Rank Forge, so the shared Forge screens and the cross-links name it correctly.

= 1.0.29 =
* Fixed: the shared Forge interface (dashboard, Connect, credits) could display in a stale translation, or fall back to English, on sites using a community language pack. It was reading the plugin's own bundled catalogue instead of the pack WordPress installs.
* Russian and Ukrainian are no longer bundled with the plugin. Both now have community-reviewed language packs on translate.wordpress.org, which WordPress uses in preference to anything shipped here — so bundling our own copy could only ever serve an older, unreviewed version. The download is 36% smaller than in 1.0.25.
* Translations: a large quality pass across all 13 bundled languages. Terminology now follows each locale's official WordPress glossary, and the Japanese, French, German, Spanish and Brazilian Portuguese catalogues follow their locale's published style guide — Japanese spacing and punctuation, French apostrophes and non-breaking spaces, German and Spanish quotation marks. Corrections made by the Dutch and Polish translation editors have been adopted as-is.

= 1.0.28 =
* Translations: reviewed every locale against WordPress core's own wording and corrected 692 strings. The plugin now uses the same vocabulary core does — the Russian word for "posts", the French term for permalinks, the Italian term for unlinking, and so on — instead of a plausible-but-foreign synonym. Two strings that had been left in English in the Hindi catalogue are translated, and a Hindi string that said the opposite of what it meant ("Disconnect") is fixed.

= 1.0.27 =
* Translations: every bundled language is now complete. 227 missing strings were translated across the 15 supported locales, and 62 plural forms that carried the English two-form shape were rebuilt with the correct number of forms for their language (3 for Russian, Ukrainian and Polish, 6 for Arabic, 1 for Japanese, Korean and Chinese) — those catalogues previously failed to compile and picked the wrong plural at runtime.
* Dropped 49 placeholder language files that were only 1–4% translated. They shipped almost nothing but English and made the download 24% larger. The 15 supported locales are unchanged: Arabic, German, Spanish, French, Hindi, Italian, Japanese, Korean, Dutch, Polish, Portuguese (Brazil), Russian, Turkish, Ukrainian and Chinese (Simplified).

= 1.0.26 =
* Fixed: hreflang alternates pointed at the page being viewed instead of the translation. On an English page the `es`, `de` and `x-default` links all resolved back to the English URL (and the same on every other language), so search engines discarded the annotation. Both the `wp_head` tags and the hreflang sitemap are affected.
* Fixed: the canonical URL on a translated page could resolve to a sibling translation instead of the page itself.
* Fixed: on a non-default-language page, permalinks lost their language prefix, because the language-aware `home_url()` was being used as the base for detecting it.
* Fixed: `/sitemap-hreflang.xml` and `/sitemap-hreflang-N.xml` were redirected to a trailing-slash URL before the sitemap could render.
* Plugin name now mentions hreflang SEO, which the plugin has always handled.

= 1.0.25 =
* readme: clearer plugin title, updated tags and an expanded FAQ covering multilingual setup, WooCommerce, hreflang, migration and RTL.
* No functional changes.

= 1.0.24 =
* Security hardening: all dynamic output is now escaped late with the context-appropriate function (esc_html/esc_attr/esc_url, esc_html__ for translated strings used as format strings, and wp_kses for trusted pre-built admin markup). No behavioural changes.
* The glossary CSV export now neutralises CSV/formula injection in exported cells.

= 1.0.23 =
* Free now supports an unlimited number of languages with no plan-based cap — removed all license-gated language-limit code (no "locked" language rows, no over-limit notice, no limit on saving).
* Tightened the glossary REST list endpoint to the same administrator capability as glossary management.

= 1.0.22 =
* Hardened WP-CLI export: files are now always written to a plugin-slug folder inside the uploads directory (wp-content/uploads/langforge/) instead of an arbitrary path, so nothing is ever written into the plugin folder.
* Uninstall cleanup now only removes data under the plugin's own unambiguous prefix, so unrelated options/metadata belonging to other plugins are never deleted.

= 1.0.18 =
* New: Support menu item that opens the Avakode support dashboard.
* New: Opt-in anonymous usage analytics (OFF by default) — see Third-Party Services.
* New: Contextual, dismissible Pro feature tips on the plugin dashboard (Free users only).


= 1.0.15 =
* WordPress.org compliance and licensing hardening.
* Pro entitlement is now resolved by the Lang Forge Pro add-on; the free plugin bundles no licensing SDK.
* The plugin no longer modifies admin notices belonging to other plugins.
* readme metadata cleanup.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.29 =
Fixes shared interface strings showing in a stale language or English on sites with a community language pack. Substantial translation improvements in all 13 languages.

= 1.0.28 =
Translation quality pass: 692 strings across all 15 languages now match WordPress core's own terminology.

= 1.0.27 =
Complete, corrected translations for all 15 supported languages, and a 24% smaller download.

= 1.0.26 =
Important SEO fix: hreflang alternates and canonical URLs on translated pages were pointing at the wrong page. Update if you rely on multilingual SEO.

= 1.0.25 =
Documentation-only update: clearer title, better tags and a much larger FAQ.

= 1.0.18 =
Adds a Support menu, optional anonymous analytics (off by default), and dashboard Pro tips.


= 1.0.15 =
Licensing and WordPress.org compliance improvements.

= 1.0.0 =
Initial release.
