=== WBW Translation === Contributors: hariorama Tags: translation, multilingual, deepl, claude, localization Requires at least: 6.0 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 1.0.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html AI-powered full-page translation with Claude AI and DeepL. Translations are permanently stored in the database and served instantly from cache. == Description == WBW Translation provides automated full-page translation of posts, pages, archives, and the homepage using Claude AI or DeepL. Translations are persisted in custom database tables and served instantly on subsequent requests, with zero runtime overhead on cached pages. The plugin is fully functional as is. There are no feature locks, no usage caps, no upgrade prompts blocking functionality, and no time-limited trials. Bring your own Claude or DeepL API key. An optional commercial add-on (`wbw-translation-pro`) is sold separately at wildbeimwild.com and provides priority email support and officially supported DeepL Pro API access. The add-on is **not required** to use this plugin. == Features == * Dual engine: Claude AI and DeepL (bring your own API key) * Permanent DB storage for translated pages * Automatic translation on publish or update * Language switcher: popup, dropdown, inline, flags * Menu and block navigation integration * Floating language switcher with configurable position * Translation queue with AJAX worker and WP-Cron processing * Bot-optimized serving from cache * Glossary with CSV import/export * URL slug translation with hreflang tags * URL and CSS selector exclusion rules * Show/hide content by language via shortcodes * Translation browser with inline editor * Batch translation for entire sites and categories * Auto-redirect based on browser language preference * Full JSON-LD SEO repair for translated pages * In-place cache migrations via filter-registered callbacks == Installation == 1. Install via Plugins → Add New, or upload the plugin folder to `/wp-content/plugins/`. 2. Activate the plugin in the WordPress admin. 3. Under **WBW Translation → Settings**, enter your Claude or DeepL API key and choose your target languages. == Screenshots == 1. Translation settings - Configure Claude AI or DeepL API and select target languages. 2. Language switcher on the frontend - Visitors can switch languages directly on the site. 3. Translation browser - Review and edit translated content inline. 4. Glossary management - Maintain consistent terminology and import or export CSV glossaries. == External services == This plugin connects to the following external services when and only when you configure them. No data is sent to any third party out of the box. === 1. Anthropic Claude API (optional translation engine) === What it does: When you enter an Anthropic API key and trigger a translation (manually, on publish, via queue, or during batch translation), the plugin sends the post title, post content (HTML), the target language code, and optional glossary terms to Anthropic's Claude API for translation. What is sent: Post title, post HTML body, target language, system prompt, and glossary entries. Your Anthropic API key is used for authentication. When: Only on translation events — never on page load, never automatically without user configuration. Endpoint: https://api.anthropic.com/v1/messages Terms of Service: https://www.anthropic.com/legal/consumer-terms Privacy Policy: https://privacy.anthropic.com === 2. DeepL API (optional translation engine) === What it does: When you enter a DeepL API key (Free or Pro) and select DeepL as the engine, the plugin sends text segments to DeepL for translation. What is sent: Text segments extracted from the post, source and target language codes. Your DeepL API key is used for authentication. When: Only on translation events. Endpoint: https://api-free.deepl.com/v2/translate (DeepL Free) or https://api.deepl.com/v2/translate (DeepL Pro) Terms of Service: https://www.deepl.com/de/terms-of-use Privacy Policy: https://www.deepl.com/de/privacy === 3. Own-site loopback (internal, no third party) === The translation queue worker triggers itself via a non-blocking HTTP request back to your own site (admin-ajax.php). These requests stay on your server and forward the currently-logged-in admin's `wordpress_*` and `wp-*` cookies so the worker can render private content. No data leaves your server via this mechanism. == Cookies == The plugin reads and writes the following first-party cookies (site-only, no tracking, no third parties): * `wbwtr_lang` — stores the visitor's preferred language when they pick one from the language switcher. Lifetime: 30 days. Purpose: remember language choice across visits. * `wbwtr_lang_redirect` — short-lived flag (1 hour) that prevents the auto-redirect-by-browser-language feature from firing twice in the same session. No analytics, advertising, or cross-site cookies are set. All cookies are set with `SameSite=Lax` and are scoped to your site. == Privacy == This plugin does not collect, store, or transmit visitor personal data. Translation requests contain only the public post content you choose to translate. == Frequently Asked Questions == = Do I need an API key? = Yes. The plugin uses Claude AI or DeepL for translation. You bring your own API key from Anthropic or DeepL. The plugin never relays translations through any third-party server controlled by us. = Is there an upgrade or premium version? = The plugin itself is free and fully functional. An optional commercial add-on is sold separately at wildbeimwild.com and provides priority email support and officially supported DeepL Pro API access. The add-on is not required. = Where are translations stored? = In two custom MySQL tables (`wp_wbw_translations` and `wp_wbw_url_maps`) on your own server. Nothing is stored externally. == Changelog == = 1.0.2 = * Added three filter hooks for optional white-label rebranding by the separately-sold pro add-on: `wbwtr_brand_name`, `wbwtr_brand_logo_url`, `wbwtr_brand_logo_visible`. None of these restrict any free-plugin functionality — they simply allow an external add-on to change the displayed plugin name and logo on the admin screens. = 1.0.1 = * Removed the `wbwtr_max_languages` filter and `WBWTR_MAX_LANGUAGES_FREE` constant. The plugin no longer caps the number of target languages. * Removed all tier-based language limit references from the admin UI and readme. * Replaced `phpcs:ignore` annotations on cached-page output with direct `wp_kses()` calls. The allowlist is provided by a new `wbwtr_full_page_kses_allowed_html()` helper covering the full HTML document structure (html, head, body, meta, link, title, script, style, plus standard sectioning, text, table, form and SVG elements). * Removed the now-unused `assets/js/admin-gate.js` (was the JS limiter for the language picker). = 1.0.0 = * First public release on WordPress.org. * AI-powered full-page translation with Claude AI and DeepL (bring your own API key). * Full feature set: language switcher (popup, dropdown, inline, flags, floating widget), glossary with CSV import/export, hreflang, slug translation, JSON-LD SEO repair, translation browser with inline editor, batch translation, auto-translate on publish, bot-optimized cache serving. * Self-contained: no license-server calls, no telemetry, no recurring API calls. == Upgrade Notice == = 1.0.2 = Adds optional white-label filter hooks for the separately-sold pro add-on. No functional changes for free-plugin users. = 1.0.1 = Removes language-tier limits and replaces phpcs:ignore output with real wp_kses() escaping for cached pages. = 1.0.0 = First public release on WordPress.org.