=== 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.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Make a WordPress or WooCommerce site multilingual: unlimited languages, language switcher, hreflang tags and import from other multilingual plugins.

== Description ==

**Lang Forge** makes a WordPress site multilingual. Add as many languages as you need, link every post, page, product or custom post type to its translations, and give each language its own address: a subdirectory such as `/fr/`, a query parameter, a subdomain, or a separate domain per language.

Search engines and visitors find the right version. Lang Forge prints hreflang tags, including the x-default entry, for every translated URL and generates an hreflang sitemap. Visitors switch language with a widget, a shortcode or an item in the admin bar, shown as flags, native language names or both. Right-to-left languages (Arabic, Hebrew, Persian, Urdu, Kurdish) are supported.

Texts of your active theme are picked up automatically: a string that passes through WordPress translation functions appears on the String Translation screen when it is shown on the front end, so you translate it there without editing .po files. To list the texts of other plugins, add their text domains under Settings → String Auto-Registration Domains. A glossary keeps brand and product names consistent. Terms can be marked Do Not Translate, and when you save a translation Lang Forge lists the glossary terms it does not follow.

On a WooCommerce store you can translate product content, product categories and tags, and store strings such as cart and checkout labels from the same Language panel you use for posts.

= Moving from another multilingual plugin =

The built-in migration tool reads the data of WPML, Polylang or TranslatePress and recreates translated posts and their language links, string translations, taxonomy translations and your language URL structure. The old plugin stays installed and untouched until you confirm the result. For sites built around WPML there is also a WPML compatibility layer with `icl_object_id()`, `icl_get_languages()`, `icl_get_current_language()` and `icl_get_default_language()`, so integrations written against WPML run without edits. One difference to check: a translation that is still a draft counts as "no translation" for visitors until you publish it.

= Free =
* Unlimited languages
* Language URLs in four formats: directory, query parameter, subdomain, domain mapping
* Manual translation linking for posts, pages and custom post types
* String translation with automatic registration of strings
* Language switcher: widget, shortcode, admin bar
* hreflang tags with x-default and an hreflang sitemap
* Glossary with Do Not Translate terms
* WooCommerce product, category, tag and store string translation
* WPML compatibility layer
* REST API and WP-CLI commands
* One-click migration from WPML, Polylang and TranslatePress
* Right-to-left support

= Pro add-on (separate plugin, not part of this download) =
* AI translation with translation memory, paid with Forge credits
* Visual editor and frontend translation
* Elementor and ACF fields in the visual editor
* Content diff and translation QA
* Analytics dashboard
* XLIFF and CSV import and export
* Bulk AI translation, translator roles, media and comment translation, live preview

The free plugin runs on your own site and contacts no external service.

Documentation: https://langforgewp.com/docs/
Comparison with other multilingual plugins: https://langforgewp.com/compare/

== External services ==

Every outbound request this plugin makes is listed below. Activating it, and opening its screens, contacts nobody.

This plugin contacts no external service. Translation, the language switcher, string translation, hreflang and migration run on your own site, and the plugin has no analytics, no telemetry and no licensing calls of its own. AI translation and quality checks belong to the separate Lang Forge Pro add-on, which describes the services it uses in its own documentation.

== 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) AI translation comes with the separate Lang Forge Pro add-on; the add-on adds its own Connect screen.

== Frequently Asked Questions ==

= How do I make my WordPress site multilingual? =

Install Lang Forge, go to Lang Forge → Languages and add the languages you need. Under Lang Forge → Settings → URL Settings pick how language URLs should look: subdirectories like /fr/, a query parameter, subdomains, or a separate domain per language. Every post, page and custom post type then gets a Language panel where you link or create its translations.

= Can I use Lang Forge on a WooCommerce store? =

Yes. It 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.

= Can I migrate from WPML to Lang Forge? =

Yes. The built-in migration tool imports your translated posts, the links between them, your string translations and your language URL structure, and WPML stays installed and untouched until you confirm the result. Lang Forge also provides a WPML compatibility layer (`icl_object_id()`, `icl_get_languages()` and related functions), so theme and plugin code written against WPML works without edits. One difference: a translation that is still a draft counts as "no translation" for visitors, so these functions return the original page (or nothing) until the translation is published. Check your theme after the switch.

= Does Lang Forge work with my page builder? =

The free plugin handles standard post content, custom post types and taxonomies, and copies the Elementor data of a page into the translation when you create one. Translating Elementor and ACF fields in a visual editor is part of the separate Lang Forge Pro add-on.

= Is there a free version, and what is in Pro? =

This plugin is the free version. It has no limit on the number of languages and includes URL routing, the language switcher, hreflang tags, string translation, the glossary, WooCommerce translation, migration, the REST API and WP-CLI commands. AI translation, translation memory, the visual editors, XLIFF and CSV import and export, and the other Pro features are in the separate Lang Forge Pro add-on.

= Does it slow down my site? =

Basic translation, the language switcher, string translation and hreflang all run locally with no external requests.
This plugin sends nothing anywhere. The separate Pro add-on, if you add it, lists its own requests in its readme.

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

Yes. Arabic, Hebrew, Persian, Urdu and Kurdish are supported: text direction is switched and the admin and switcher layout adjust automatically.

= Is my content sent to OpenAI? =

Not by this plugin; AI translation is a feature of the separate Pro add-on, which lists its own requests in its readme.

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

A glossary is your list of terms and the translation each one must have in another language: brand names, product names, industry terminology. A term can also be marked Do Not Translate, to stay as written. Terms are kept per language pair on the Glossary screen; you add them one by one or import a CSV file, and matching ignores letter case unless you switch on Case Sensitive.

The glossary does not change a translation and never stops you from saving one. When you save a translation of a post or page, or translations on the String Translation screen, Lang Forge compares them with the original and lists the glossary terms the translation does not follow, so you can correct them: in the Language box of the editor and in a notice after the save. The comparison looks for the term as it is written, so a term in another grammatical form (another case or plural ending) may be listed as missing.

AI translation (the Lang Forge Pro add-on) sends the glossary of the language pair with its requests, and the AI is told to use your translations and to keep Do Not Translate terms as written. Adding or changing a term also drops the Translation Memory entries that contain it, so the next AI translation uses the new term.

You need a glossary when names and terms must read the same on every translated page: a product name that must stay in English, or a term your industry translates one particular way.

== Screenshots ==

1. Setup: add languages, set language codes, display labels, switcher visibility and the default language.
2. The Language panel in the editor lists every linked translation and creates missing ones in one click.
3. A language column on the posts list with per-language filters, counts and translation shortcuts.
4. URL structure: subdirectory, query parameter, subdomain or domain mapping, with the language fallback chain.
5. The front-end language switcher with flags and native language names.
6. Migration: Lang Forge detects an existing multilingual plugin and imports its data without touching the original.

== Changelog ==

= 1.5.0 =
* If you run the add-on, use Lang Forge Pro 1.1.4 or newer, as before.

= 1.4.1 =
* If you run the add-on, use Lang Forge Pro 1.1.4 or newer, as before.
* Background jobs: on a site where WP-Cron is switched off (DISABLE_WP_CRON), queuing a job no longer sends the request that wakes WP-Cron. The site's own cron runner starts the job, as you set it up.

= 1.4.0 =
* If you run the add-on, use Lang Forge Pro 1.1.4 or newer, as before.
* Uninstall keeps translations, translation memory, glossary, strings, analytics and settings unless "Delete Lang Forge data on uninstall" is selected.
* Fixed: keep the uninstall choice compatible with older Free versions when only one package has been updated.
* Removed unused Freemius integration code.

= 1.3.0 =
* Migration from WPML and Polylang now brings over the translations of categories, tags and other taxonomies: each translated pair becomes one linked group, as the posts do, and a second run does not double the rows. WPML's own bookkeeping taxonomy (translation priority) and taxonomies the site does not register are left out. Migration from Polylang no longer reads Polylang's "sync" list in a translation group as a post.
* The glossary now checks translations typed by hand. When you save a post or page, or translations on the String Translation screen, Lang Forge compares them with the original and lists the glossary terms the translation does not follow: in the Language box of the editor (the block editor shows it right after the save) and in a notice after the save. It only warns: nothing is blocked or changed. The check reads HTML entities such as &amp; as the characters they stand for. The REST API gives the same list in the read-only field `langforge_glossary_warnings` of a post, for people who can edit it. The comparison looks for the term as written, so a term in another grammatical form can be listed by mistake.
* Glossary CSV: importing a file you exported gives the terms back as they were. A term, translation or description that starts with "=", "+", "-" or "@" no longer gets a stray apostrophe in front of it.
* Fixed: a post with the same number as a translated category or tag no longer picks up that category's translations in the hreflang tags, the language switcher and the hreflang sitemap. Deleting a post no longer erases the translations of a category or tag with the same number, the migration from WPML, Polylang and TranslatePress no longer deletes term translations, and the counts and the list of outdated translations on the Translation Status screen count posts only.
* Fixed: with a static front page, the front page of another language declared the English home page and x-default at /home/ in the hreflang tags; it now declares the address of the site. A category, tag or other taxonomy archive names in hreflang only the languages it is translated into, with the address of the translated archive; date, author and post type archives name only their own language. The hreflang address of an archive, an author page, a date page or a later page ends with the same slash as its canonical address, and on a site whose permalinks end without a slash the home of a language (/es/) keeps its slash in canonical and hreflang.
* Language addresses on sites that give each language a subdomain or a domain: one rule now builds the address of a language in permalinks, hreflang, canonical, the language switcher and localized links, and a redirect to the host of a language is let through. A post opened by its slug follows the same language rule as a page: with no fallback language, or with fallbacks off, it is not shown under another language's address. The fallback for a page that is not found takes the language from the same reading of the request as the check that allows it, the language cookie included.
* The short address of a translation (/?p=<id>, the one of the "shortlink" tag) now opens that translation in its own language instead of redirecting to the post in the default language.
* The redirect to the browser language skips search engine crawlers (Googlebot, Bingbot and others; Sogou crawlers are recognized by their robot names, the Sogou mobile browser is a visitor). The list can be changed with the filter `langforge_crawler_user_agents`.
* The language switcher in the admin bar, on the pages of the site, now links to the translation of the page you are on. Before, it linked to the home page of the language.
* The Shop page of a language (for example /es/tienda/) now lists the products of that language.
* The Language box now runs the action `langforge_meta_box_after_translations` after the list of translations. Before, nothing ran it, so the WooCommerce hint of a product and the Live Preview buttons of Lang Forge Pro, which wait for it, were never shown.
* WPML compatibility: `wpml_object_id()` and `icl_object_id()` find the translation of a category, tag or other term. Where WPML is not installed, `ICL_LANGUAGE_CODE`, `ICL_LANGUAGE_NAME` and `ICL_LANGUAGE_NAME_EN` are defined with the current language; before, WP Recipe Maker stopped the post edit screen with an undefined constant.
* A notice warns when Polylang or TranslatePress is active next to Lang Forge, as it already did for WPML. It has the same screens and a link to the Migration screen.
* REST: the `langforge_translations` field of a post lists the published translations for a visitor who is not signed in, so a headless front end can build its language switcher; drafts and private translations stay hidden. It lists only the translations of the type of the post asked about.
* WP-CLI: `wp langforge link` refuses a post that does not exist ("Post N not found.") and writes nothing; linking two posts that are already translations of each other changes nothing. `wp langforge unlink` says "Post N not found." for a post that does not exist instead of reporting Success. `wp langforge set-language`, `translate` and `export --lang=xx` refuse a language the site does not have and list the languages it has.
* Fixed: the cross that unlinks a translation of a category or tag works on the edit screen of a single term, not only in the list of terms. Updating a translated post through the REST API, XML-RPC, WP-CLI or an app (for example only its title) no longer moves it to "Uncategorized": the categories and tags the post already has are no longer hidden from the request that saves it. Category and tag lists on the site pages are still shown in the language of the page.
* Elementor: when a page is copied into another language, only the elements get new IDs; the IDs inside the settings of an element (a picture, a gallery) stay as they are. Lang Forge also remembers which element of the copy belongs to which element of the original, which the Visual Editor of Lang Forge Pro 1.4.0 uses to save Elementor text into the right element.
* Messages with a number take the plural form of that number in every language, also in languages with more than two forms, such as Russian, Polish and Arabic: the count of imported glossary terms, of the posts of a removed language and of the other counted messages.
* The Forge Suite dashboard names Form Forge as Fillin Forge, Clearway Forge links open the pages Clearway registers, an installed plugin is taken for a product only by its known main file or text domain, and the Results CSV download holds the rows only, with no page of text at its end.
* The Forge Suite dashboard no longer carries prices or a purchase link in this package.
* The texts added or changed in this release (the glossary warnings, the Polylang and TranslatePress notice, the plural forms) are translated into the 15 shipped languages.
* Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before.

= 1.2.12 =
* The Forge Suite dashboard lists Cascade Forge and Inclusive Forge as available on wordpress.org. The plugin logo and icon use the new mark.
* The shared e-mail template carries a note for the wordpress.org code check; the e-mails it sends are unchanged.
* Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before.

= 1.2.11 =
* Alt text and caption of a picture can be translated. The Media Translations box on the full Edit Media screen of a picture (pictures only, not PDF or video files) now saves what you type for each language; before, the fields were shown and nothing was kept. A page in that language shows them: pictures in posts and pages, the WooCommerce product gallery in a classic theme (main picture, thumbnails, lightbox, the picture of a chosen variation) and the Product Gallery block of a block theme (alt text of the main picture, thumbnails and lightbox). A language left empty shows the text of the main language. The alt text and the caption of the media library and of the original language stay as they are.
* Fixed: the text WooCommerce saves with a variation (for example "Color: Red" or "Color: Rojo") could take the attribute value in the wrong language when a plugin or the theme works on a copy of the value while it is read. It keeps the language of the product now.
* Fixed: on a site where a language has its own subdomain or its own domain, the summary of a translated variation showed the original name ("Red", or "Crimson" after you renamed the value) instead of "Rojo" when you saved the variation or renamed an attribute value in the admin of that language. It stays in the language of the variation.
* Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before.

Older versions are listed in changelog.txt in the plugin folder.

== Upgrade Notice ==

= 1.5.0 =
If you use the add-on, keep Lang Forge Pro 1.1.4 or newer, as before. A translation stopped by running out of credits keeps its paid parts and can be finished without paying again.

= 1.4.1 =
If you use the add-on, keep Lang Forge Pro 1.1.4 or newer, as before. Sites that switch WP-Cron off no longer get the request that wakes it.

= 1.4.0 =
If you use the add-on, keep Lang Forge Pro 1.1.4 or newer, as before. Uninstall keeps customer data unless the deletion checkbox is selected.




= 1.3.0 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. Migration from WPML and Polylang brings over the translations of categories and tags, hreflang and language addresses are corrected, and the glossary now warns about translations that do not follow it.

= 1.2.12 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. The Forge Suite dashboard lists Cascade Forge and Inclusive Forge as available on wordpress.org, and the plugin logo and icon use the new mark.

= 1.2.11 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. The alt text and the caption of a picture are saved per language and shown on pages in that language, and the text of a translated variation keeps its language.

= 1.2.10 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. Strings that differ only in case or accent get their own translations, and "Find WooCommerce strings" goes on after a break. The first admin page after the update changes the strings table.

= 1.2.9 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. Translated posts open under the language folder with every permalink structure, and email texts and WooCommerce strings can be translated on the String Translation screen.

= 1.2.8 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. Feeds and archives under a language folder work, attribute values show on translated product pages, and the login forms keep the language of the page.

= 1.2.7 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. Variable WooCommerce products get their variations in every translation, and stock changes in one language update the others.

= 1.2.6 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. WooCommerce and WordPress texts on translated pages (cart, checkout, My account) are now in the language of the page, not of the site.

= 1.2.5 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. WooCommerce emails to the customer go out in the language of the order, store pages under a language folder open, and the Plain switcher shows the language name.

= 1.2.4 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. Custom fields are now copied to a new translation exactly as they are stored: several values of one field are all kept, and backslashes and lists are no longer changed.

= 1.2.3 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. The "Link" button now refuses a post that cannot be a translation (the original itself, another type, in the Trash) and says why.

= 1.2.2 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. The dropdown language switcher now opens from the keyboard and on touch screens, not only on mouse hover.

= 1.2.1 =
Fixes a fatal error on sites that run WooCommerce with the 1.2.0 package from WordPress.org: update now if you run WooCommerce. Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before.

= 1.2.0 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on, as before. Failed translations are recorded per language, and deleting the last Forge plugin now removes everything Forge stored on the site, on every site of a network.

= 1.1.0 =
One canonical link and one og:locale next to Rank Math, Yoast SEO, All in One SEO, SEOPress and The SEO Framework; hreflang codes match between page head and sitemap. Needs Lang Forge Pro 1.1.4 or newer if you run the add-on; Pro 1.2.0 adds shortcode protection for AI translation.

= 1.0.41 =
Deleting the plugin leaves the job queue shared by the Forge plugins alone while another one is still installed. If you run Lang Forge Pro, it must be 1.1.4 or newer.

= 1.0.40 =
Needs Lang Forge Pro 1.1.4 or newer if you run the add-on: the licence screen moved into it, and an older add-on stays switched off until it is updated. String Translation shows no locked AI button.

= 1.0.39 =
Still needs Lang Forge Pro 1.1.0 or newer. Glossary opens with no licence check, the PRO badges follow whether the add-on is installed, and the String Translation help names the shortcode that works.

= 1.0.38 =
Still needs Lang Forge Pro 1.1.0 or newer. A fresh install on a site without WPML or Polylang now starts in the site's own language instead of switching it to Russian; language settings you already have are not changed.

= 1.0.37 =
Needs Lang Forge Pro 1.1.0 or newer — an older add-on is switched off whole, so AI translation, translation memory, QA and the frontend editor stop until you update it. Translations already saved are untouched.

= 1.0.29 =
Maintenance release.

= 1.0.28 =
Maintenance release.

= 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 and dashboard Pro tips.


= 1.0.15 =
Licensing and WordPress.org compliance improvements.

= 1.0.0 =
Initial release.
