=== Northpublisher Libre Translate ===
Contributors: milllan
Tags: translation, libretranslate, multilingual, language switcher, ajax
Requires at least: 5.8
Tested up to: 6.9
Stable tag: 2.9.60
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

LibreTranslate-powered front-end translation with a floating language switcher, WordPress proxy requests, ?lang URLs, and optional translation cache.

== Description ==

Northpublisher Libre Translate connects WordPress to a LibreTranslate-compatible API server and adds a front-end language switcher for live page translation.

The WordPress.org build is fully functional on its own. You configure the LibreTranslate API URL you want to use. If that server requires an API key, enter it in the plugin settings and requests are proxied through WordPress so the key is not exposed to visitors.

= Main features =

* Floating language switcher with local flag assets.
* Query-parameter language URLs such as `?lang=de`.
* WordPress proxy transport for reliable full-page translation.
* Optional API key stored server-side.
* Optional server translation cache for repeated strings.
* Shared hosting mode with smaller translation batches.
* Safe mode for conservative request sizing.
* Per-page/post/product option to disable translation where needed.
* Runtime diagnostics and connection testing in wp-admin.
* Shortcode: `[npnplibltr_translate]`.

= External service =

This plugin requires a LibreTranslate-compatible API server to perform translation processing. You can host your own LibreTranslate instance locally (self-hosted) or connect to any external service of your choice by entering its URL in the plugin settings.

The actual processing of translation segments is performed on that external server.

* Service: User-configured LibreTranslate API (e.g., https://translate.libre-server.com or your private instance).
* Data sent: Text segments selected for translation, source language, and target language.
* When sent: When a visitor selects a non-primary language or when an administrator tests the connection in the dashboard.
* Terms of Use: https://n-software.net/terms-of-service-tos/ (or your provider's terms).
* Privacy Policy: https://n-software.net/privacy-policy (or your provider's policy).
* Purpose: This external service provides translation functionality that cannot be performed locally by the plugin itself without a dedicated translation engine.

== Installation ==

1. Upload the plugin ZIP through **Plugins -> Add New -> Upload Plugin**.
2. Activate **Northpublisher Libre Translate**.
3. Go to **Settings -> Libre Translate**.
4. Enter your LibreTranslate API Server URL.
5. Add an API key if your server requires one.
6. Select the primary language and target languages.
7. Save settings and test the switcher on the front end.

== Frequently Asked Questions ==

= Does this plugin work on its own? =

Yes. The WordPress.org build is fully functional when connected to a LibreTranslate-compatible API server.

= Which URL format does this build use? =

It uses query-parameter URLs such as `https://example.com/page/?lang=de`.

= Why does translation sometimes take a few seconds? =

The first translation of a page depends on your WordPress hosting, network latency, and the speed of the LibreTranslate server. Enabling server translation cache can reduce repeat work.

= Can I use my own LibreTranslate server? =

Yes. Enter your server URL in the plugin settings. If your server requires authentication, enter its API key.

= Does the API key appear in browser JavaScript? =

No. When an API key is configured, translation calls go through WordPress.

= Can I disable translation on a specific page? =

Yes. Edit the post, page, or product and enable the "Do not translate this page/post/product" option.

== Screenshots ==

1. Settings screen with API URL, target languages, and performance options.
2. Floating language switcher on the front end.

== Changelog ==

= 2.9.60 =
* WordPress.org compliance cleanup: fully enabled all shipped functionality without license checks, moved fallback JavaScript to wp_add_inline_script(), and removed generic/legacy public names.

= 2.9.59 =
* WordPress.org compliance cleanup: removed restricted-feature UI and paid-activation documentation from the directory package.
* Kept the front-end switcher, `?lang=` translation flow, API connection test, WordPress proxy, and cache options functional.

= 2.9.58 =
* Rebuilt the WordPress.org ZIP with a more compatible archive writer.
* Kept query-parameter language URLs in query-parameter mode and improved Test Connection status text.

== Upgrade Notice ==

= 2.9.60 =
WordPress.org compliance cleanup for the directory package. Existing translation settings are preserved.