=== wpLingua - Automatic translation - Translate and make website multilingual ===
Contributors: wpr0ck, lyly13, pierrelannoy, wplingua
Donate link: https://wplingua.com/
Tags: translate, translation, multilingual, localization, language
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 2.14.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Make your websites multilingual and translate them automatically: no word limits, editable translations, SEO-friendly, no coding knowledge needed

== Description ==

**An all-in-one solution that makes your websites multilingual and translate them automatically, without word limits.**

✓ One free first language for non-commercial websites
✓ Automatic translation API connector
✓ Unlimited number of translated words
✓ SEO-friendly: indexing of translated pages in search engines
✓ On-page visual editor for editing translations
✓ Customizable language switcher
✓ Translate website URLs
✓ Making XML sitemaps automatically multilingual
✓ No coding knowledge needed
✓ Self-hosted data
✓ Open source, find [wpLingua on GitHub](https://github.com/julien-jacob/wplingua)
✓ And more!

### 🎬 6 minutes to translate your website

[youtube https://www.youtube.com/watch?v=T1fTHnZhH-0]

Video tutorial available in [Chinese](https://youtu.be/ET2ijgN3cUw?si=6L2_KlZJ6Dw3kOJq), [Danish](https://youtu.be/cxoMK5UamXA?si=sbaK-Fx8GAfsl8Bu), [English](https://youtu.be/T1fTHnZhH-0?si=rELV5g5I4i9KwVG0), [Finnish](https://youtu.be/niuBK79uK4Y?si=fKs6mvNqLCTliOIV), [French](https://youtu.be/No6PdIJrbrk?si=2w2yJERXIhdSfqFb), [German](https://youtu.be/TvyHn8n9zr4?si=FSWSHd8YkW17V07u), [Greek](https://youtu.be/MMrkmhzVrNM?si=A0BM0Mq-gBgIQ-rT), [Hindi](https://youtu.be/TCoaBMCusbE?si=eXACXPXZtAeC4J2P), [Italian](https://youtu.be/yYNkJqbFGeo?si=VBkJrNck4_kPma-0), [Japanese](https://youtu.be/H9jL6B9ZoRk?si=ZOoNKdxE67LMt4Sv), [Korean](https://youtu.be/FGi68qYvzWg?si=zNZKYPUvf12FNxCz), [Polish](https://youtu.be/QkQ8fn7XZkY?si=Z4aEfcVHs05_AOLS), [Portuguese](https://youtu.be/W8lGMYeE-wQ?si=SorUAE_AVW8-ezKE) and [Spanish](https://youtu.be/ePsri0sP99Y?si=l3JCik3Z-B0hg4CR). 

### 🔥 One free target language ###
The first language translation is completely free for non-commercial websites. If your website is of a commercial nature (e-commerce, advertising, etc.), a commercial licence is available.

### 🧮 No word limits! ###

Don't count the words on your website to decide which plan to choose, wpLingua doesn't limit them! Simply choose the number of target languages and translate without counting!

### 🚀 Optimized for international search engines (SEO) ###
When you use wpLingua on your website, all elements of your content - even those that are invisible - are translated.

wpLingua is "SEO-Friendly" because it takes care of translating:

✓ Meta Title tags
✓ Meta Description tags
✓ Hreflang alternative links
✓ Meta tags for social networks (Twitter X, OpenGraph Facebook...)
✓ ALT attributes of images
✓ And more.

By optimizing indexing, we ensure that your translated pages are not only understood by your audience, but are also easily found by search engines.

### 🪄 Streamlined Setup Process ###
Forget about complex plugins to set up, wpLingua enhances the user experience of the multilingual world. 

All you need to do to get started is request your machine translation API key, then play with the language switcher appearance options!

Let wpLingua take care of the technical aspects while you concentrate on creating compelling content for your international audience. Our commitment is **to make multilingual capabilities accessible and easy to use for all WordPress users**. 

### ✍️ Tailor-made translations at your fingertips with our On-Page Editor ###
Although wpLingua gives you the convenience of **machine translations**, we understand the nuances of each language. 

wpLingua allows you **to fine-tune each translation manually** if you need to.

Experience the fusion of automation and the personal touch with our **visual on-page editor**.

### 🔗 Editable URL translation ###
The plugin **automatically discovers URLs on your website and lets you translate them**. URLs are split into slugs (parts of the URL), making them easy to edit. This feature boosts SEO performance!

### 🎨 Fully customizable language switcher ###
wpLingua's language switcher is fully customizable. You can display the language selector in four ways:

✓ Automatic insertion via predefined positions.
✓ Use a shortcode to display it wherever you like.
✓ Insertion in the navigation menu using the design defined by the theme.
✓ Insertion in the navigation menu from the site editor using the Gutenberg block named Language Switcher

You can also control the appearance of the language switcher using:

✓ Switcher styles (dropdown, inline and block)
✓ Predefined themes (light, dark, chameleon, etc.)
✓ Configurable language names (translated name, original name, language ID, etc.)
✓ Flag shapes (round, rectangle and wavy)
✓ Language-based flag choices or import your own flag images
✓ Adding custom CSS in a dedicated insert

With all these customization options, there's no way your website's language switcher will look like any other!

### 📖 Translation rules by dictionary ###
The dictionary allows you to define translation rules that apply when generating machine translations. You can specify words or sets of words that should never be translated, or define how they should be translated for each language.

### 🖼️ Translation of links and media ###
This feature lets you apply translation rules to links and media, offering even greater customization. You can display different images or modify link URLs according to the current language. These rules apply to the following elements: Link URLs, image URLs, iframe URLs and URLs in intercepted JSONs.

### 🧭 Intuitive possibilities to exclude certain translations ###
Navigate the complexities of website translation with wpLingua's intelligent exclusion feature. 

Want to preserve specific sections of a page in its original language? Our system seamlessly allows you to pinpoint and **exclude translations using CSS selectors**. 

If entire pages need to remain untouched, effortlessly exclude them by their URL. All of this can be managed with ease through our user-friendly exclusions manager. 

With wpLingua, you're always in command of what gets translated and what doesn't, ensuring your website's essence remains intact.

### 💫 Supported languages ###

#### The plugin supports the following languages ####

Arabic ∘ Chinese ∘ Danish ∘ Dutch ∘ Slovak ∘ English ∘ Finnish ∘ French ∘ German ∘ Greek ∘ Hebrew ∘ Hindi ∘ Hungarian ∘ Indonesian ∘ Italian ∘ Japanese ∘ Korean ∘ Norwegian ∘ Polish ∘ Portuguese ∘ Russian ∘ Spanish ∘ Swedish ∘ Turkish ∘ Ukrainian ∘ Vietnamese 

#### The plugin is translated into the following languages ####

Danish ∘ Dutch ∘ English ∘ Finnish ∘ French ∘ German ∘ Hindi ∘ Hungarian ∘ Indonesian ∘ Italian ∘ Japanese ∘ Korean ∘ Portuguese ∘ Spanish ∘ Swedish

You can contribute to the translation of the [wpLingua plugin on translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/wplingua/) and contribute to the editing of [PO/MO translation files on GitHub](https://github.com/julien-jacob/wplingua/tree/develop/languages).


### 🔌 Theme and plugin compatibility ###
The method used by wpLingua to translate website texts ensures compatibility with most themes and plugins.

**Compatible plugins tested:** WooCommerce, Yoast SEO, SEOPress, All in One SEO, SEOKey, Elementor, Gutenberg, Divi Builder, Advanced Custom Fields (ACF), Contact Form 7, Fluent Forms, WP Forms, Gravity Form, MailPoet, WP Rocket, Cache Enabler, WP Fastest Cache, All-in-One WP Migration, UpdraftPlus, Redirection, Complianz, WF Cookies, Complianz, LuckyWP Table of content, WP Grid Builder, and more...

**Compatible themes tested:** Divi, Twenty Twenty-One, Astra, OceanWP, Blocksy, Hello, GeneratePress, Neve, Envince, Twenty Twenty-Four, Twenty Twenty-Five, Poe, Neve FSE, Frost, Tove, and more...

### ⚡️ The wpLingua API and plugin connectors ###
The wpLingua plugin relies on our own wpLingua API, an integrated third-party service, to provide its machine translation functionality. The call to this Third Party Service (wpLingua API) is made when creating an API key from the plugin, during API key verification and when your website requests a new automatic translation (new texts discovered on a page web or request automatic translations from the translation edition). We invite you to consult our [Terms & Conditions page](https://wplingua.com/terms-and-conditions/) for more information.

**Keywords**: wpLingua, WP Lingua, WP-Lingua, Multilingual, Bilingual, Translation, Translate, Translated, Translator, Localization, Automatic translation, Machine translation, Translation connector, Languages, Language switcher, Language selector, API, SEO, Custom flags


== Installation ==

1. Download the plugin zip file and install it via the WordPress interface, or upload it directly to your plugins directory.
2. Activate wpLingua from your plugins page.
3. Navigate to the wpLingua settings to get your free API key and to set up your language preferences.
4. Start translating your content!

== Frequently Asked Questions ==

= What languages are available for plugin administration? =
For the time being, the plugin administration is available in Danish, Dutch, English, Finnish, French, German, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Portuguese, Spanish, and Swedish. If you want to help us translate it into more languages, don't hesitate!

= What languages are available for translation? =
The plugin supports the following languages: Arabic ∘ Chinese ∘ Danish ∘ Dutch ∘ Slovak ∘ English ∘ Finnish ∘ French ∘ German ∘ Greek ∘ Hebrew ∘ Hindi ∘ Hungarian ∘ Indonesian ∘ Italian ∘ Japanese ∘ Korean ∘ Norwegian ∘ Polish ∘ Portuguese ∘ Russian ∘ Spanish ∘ Swedish ∘ Turkish ∘ Ukrainian ∘ Vietnamese

= How it works? =
wpLingua intercepts page content and analyzes HTML and JS code. It discovers all texts, translates them and makes the pages multilingual. This approach ensures compatibility with most themes, plugins and page builders such as Gutenberg, Elementor, Divi…

= Is wpLingua compatible with WooCommerce or other plugins? =
Absolutely! wpLingua intercepts page content and analyzes HTML and JS code. It discovers all texts, translates them and renders the pages multilingual. This approach guarantees compatibility with the translation of your WooCommerce online store, as well as with all other WordPress plugins.

= Is wpLingua compatible with Divi or other Theme? =
The method used by wpLingua to translate website texts guarantees compatibility with most themes. Themes tested with guaranteed compatibility: Divi, Twenty Twenty-One, Astra, OceanWP, Blocksy, Hello, GeneratePress, Neve, Envince, Twenty Twenty-Four, Twenty Twenty-Five, Poe, Neve FSE, Frost, Tove, and more…

= Is wpLingua compatible with Gutenberg or other page builders? =
The method used by wpLingua to translate website texts guarantees compatibility with most page builders. Page builders tested with guaranteed compatibility: Elementor, Divi Builder, Gutenberg.

= Is wpLingua compatible with WordPress Multisite? =
No, wpLingua is not compatible with WordPress Multisite

= Is wpLingua compatible with caching plugins? =
Quite ! And it's even recommended to cache your pages and translations to improve website loading and performance.

= Is there a Gutenberg block to easily insert the language selector from the site editor? =
Yes! If your website uses a block-based theme (like Twenty Twenty Five, Neve FSE, etc.), you can easily edit the website header via the Site Editor to add the Language switcher block in the location of your choice. You can also easily display the language switcher wherever you want using our shortcode provided for this purpose. Simply copy and paste this shortcode where you want: **[wplng_switcher]**

= How can I get more languages? =
To get more than one language, you need to opt for the Premium package, which gives you access to up to 25 translated languages.

= Do I need a DeepL or Google Translate plan in addition to wpLingua? =
No. Translations are managed by our API integrated in wpLingua. You do not need to purchase an additional plan.

= Is wpLingua entirely free? =
You can use wpLingua free of charge to translate your website into the language of your choice, provided your website is not intended for commercial use. If your website is for commercial use, or if you would like more languages translated, we invite you to choose a premium package.

= Where are my translations stored? =
Your server’s database holds all the translations locally.

== Screenshots ==

1. When you visit your translated page, you can activate the editor to modify your translations if necessary.
2. Installing wpLingua and creating an API key.
3. You can choose which flag to display by language or import a custom flag.
4. Customize language selector, activate or deactivate automatic insertion + choose position, use shortcode or add directly to menu.
5. Many options available for the language switcher, even adding custom CSS.
6. SEO tags are translated automatically, but you can modify them manually.
7. Dictionary: define translation rules that apply when generating machine translations.
8. You have the possibility to exclude pages or parts of pages.
9. wpLingua adds a list of your website's slugs. You can decide whether or not to translate them.
10. All translations are stored on your WordPress website.
11. Translations are automatically generated by wpLingua. When you visit the page for the first time (from the admin), you'll see the translation progress.
12. SEO-Friendly: wpLingua add the HTML code needed for your translated pages to be indexed by search engines.

== Changelog ==

= 2.14.3 =

* Set api.wplingua.com as the API URL
* Fixed the issue with spaces being preserved between strings
* Fixed the dictionary option page: textarea height in WP 7.0 

= 2.14.2 =

* Quick fix for API proxy

= 2.14.1 =

* Improve compatibility:
 * Theme: Bricks
 * Theme: GeneratePress
 * Plugin: advanced-post-block
 * Plugin: top-10

= 2.14.0 =

* New language supported: Norwegian
* Tested up to WordPress version 7.0

= 2.13.1 =

* Improvement:
 * Update option page design for WordPress 7.0 compatibility (flex layout)
 * Enhance CodeMirror editor settings and styles for better usability in option page switcher
 * Prevent duplicate excluded elements in DOM processing
 * Refactor exclusion tag processing to streamline checks
 * Refactor selector sanitization and ensure filters return an array
 * Refactor attribute setting for translated links and media URLs for improved readability
 * Hide advanced-post-block admin notice
* Fix:
 * Fix translation text retrieval in `wplng_dom_translate_nodes_texts` function
 * Update HTML entity decoding to use `ENT_HTML5` for improved compatibility across attribute, JSON and HTML translators
 * Fix regex pattern in i18n script JSON parsing to correctly match quotes
 * Fix regex pattern in i18n script translation and adjust return value in function call translation
 * Fix exclusion check in JSON translation to use the correct element
 * Fix body class assignment in editor mode and list mode
 * Fix body element selector in body class modification
 * Fix translation domain in close button title for overload notification
 * Improve error handling in AJAX overload function

= 2.13.0 =

* Performance:
 * Refactor caching mechanism from transients to options for translations and slugs
 * Add caching for translated attributes, JSON functions, URL parsing and language lists
 * Optimize `wplng_get_translated_text_from_translations()`, meta_query structures and `wplng_text_is_translatable()`
 * Skip JS script translation files larger than 2MB for JSON translation files
 * Handle JSON generation failures gracefully in script translation functions
 * Replace `strpos`/`str_contains` with `wplng_str_contains` wrapper throughout codebase
* Improvement:
 * Implement search query translation with placeholder tags and restore functionality
 * Add notice for original text containing search query tag in translation editor
 * Decode slug before truncating to ensure accurate title length
 * Better wplng_text_esc() function
 * Add cache and option cleanup on plugin deactivation
 * Add input validation to string utility functions
 * Add wplng_bypass_multisite_incompatibility filter
* Security:
 * Prevent path traversal attacks in cache file operations
 * Sanitize custom CSS output to prevent breaking out of `<style>` context
 * Add input validation and strict type checks across admin option pages (escaping, `esc_html_e`, `esc_attr__`)
 * Sanitize post ID in AJAX modal edit and save functions
 * Sanitize API key expiration date and error messages from API responses
 * Improve sanitization in slug and translation save functions (replace `stripslashes` with `wp_unslash`)
 * Add error handling for invalid IV length in encryption functions
 * Enforce strict type checking for API feature flags
* Fix:
 * Normalize slugs in translation to prevent cache misses for non-ASCII characters
 * Slug creation logic in admin bar using wrong variable after loop
 * Undefined `$language_target_id` in `wplng_get_language_name_translated()`
 * Cache variable not properly set in `wplng_get_language_current_id()`
 * `wplng_get_language_by_id()` now handles missing language IDs and prevents infinite recursion
 * Regex pattern in `wplng_get_translated_text_from_translations()` to correctly capture trailing whitespace
 * Regex pattern in `wplng_url_is_translatable_no_filter()` to correctly match file URLs
 * Regex validation in `wplng_get_url_exclude_regex()` to prevent PHP errors on invalid patterns
 * Regex fallback in `wplng_link_media_apply_rules()` to return original URL if `preg_replace` fails
 * Return value handling in `wplng_translate_html()` and incorrect type casting of DOM object
 * Non-ASCII characters now preserved in translated search queries
 * Slug sanitization and decoding in `wplng_create_slug()`
 * Removed incorrect `esc_attr` from `wplng_get_switcher_class()` return value
 * `wplng_save_translation()` now returns the result of save or update operations

= 2.12.3 =

* Change menu access capability from 'administrator' to 'edit_posts'
* Add confetti effect on successful first loading

= 2.12.2 =

* Enhance JSON and HTML translation handling in AJAX callbacks with filter hooks

= 2.12.1 =

* Update plugin translations

= 2.12.0 =

* Make wpLingua compatible with websites in subfolders
* Refactor translation and dictionary functions to include target language IDs, improving tagging and replacement logic
* Fix missing jQuery dependency for "Load in progress"
* Enqueue Dashicons for better compatibility when the admin bar is disabled
* Update the target language label in free API key registration
* Clarify how default settings are used in switcher options documentation


All changelogs and previous versions of the wpLingua plugin are available on the releases page of the project's GitHub repo: [https://github.com/julien-jacob/wplingua/releases](https://github.com/julien-jacob/wplingua/releases).

== Upgrade Notice ==

= 1.0.0 =
First release. Be sure to set up your preferences after installation.
