=== LangRelay === Contributors: langrelay Tags: translate, multilingual, translation, seo, geo seo Requires at least: 6.0 Tested up to: 6.9 Requires PHP: 8.0 Stable tag: 1.9.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Translate your site into 100+ languages and get found by Google, ChatGPT, and AI search engines. == Description == Most translation plugins translate your content and stop there. LangRelay translates your content, your URLs, your metadata, and your llms.txt so your site gets found by both traditional search engines and AI models in every language you sell in. = What you get = * AI translations that read like a human wrote them. * Translated URLs. `yoursite.com/about-us` becomes `yoursite.com/nl/over-ons` * Automatic hreflang tags, translated meta descriptions, and language-specific sitemaps * Translated llms.txt for every page, so ChatGPT and other providers can cite your site in other markets * Built-in language switcher (dropdown, flags, or list) as a Gutenberg block, Elementor widget, shortcode, or auto-injected * Works with WooCommerce, Yoast, Rank Math, WP Rocket, and other plugins out of the box. = How it works = Install the plugin, connect your LangRelay account, pick your languages. That's it. LangRelay captures your page, translates it and serves translated pages to visitors. = GEO: get found by AI search engines = Google is only half the story nowadays. ChatGPT, Perplexity, Gemini, and Claude are answering questions your customers ask, in languages you might not be covering yet. LangRelay generates AI-readable pages and translated llms.txt files so these models can discover, understand, and cite your site across markets. = What makes LangRelay different = You only pay for the words that actually get translated. If the same sentence appears on 500 pages, you pay for it once. Most translation plugins count every word on every page, which adds up fast on larger sites. = Pricing = * Free: 1 project, 1 language, 10K credits/mo * Starter (EUR 19/mo): 3 projects, 3 languages, 150K credits/mo * Growth (EUR 69/mo): 10 projects, 10 languages, 1.5M credits/mo * Business (EUR 199/mo): Unlimited projects and languages, 15M credits/mo Annual billing saves ~17%. Full pricing at [langrelay.com/pricing](https://langrelay.com/pricing). = How credits work = One credit is one translated word. A 500-word page into one language costs 500 credits. Into three languages, 1,500. Credits only count the first time a piece of text is translated. If you update a paragraph on your homepage, only that paragraph uses credits again. The rest of the page stays as-is. Duplicate content (like your footer showing up on every page) is recognized and only translated once. Your credits reset every month. They pool across all your projects, so you don't need to guess how to split them. = Meet Relay = Relay is your AI assistant inside the LangRelay dashboard. Ask it about translation coverage, quality scores, or which pages still need attention. It pulls live data from your project so you don't have to dig through the user interface. = External services = **LangRelay API** This plugin sends page HTML to the LangRelay API for translation. Data is sent over HTTPS. Your WordPress database is never modified. What is sent: page HTML, your authentication token, target language code. When: on untranslated or uncached page requests, during setup verification, and when syncing project settings. * [langrelay.com](https://langrelay.com) * [Terms of Service](https://langrelay.com/terms) * [Privacy Policy](https://langrelay.com/privacy) By using this plugin you agree to LangRelay's Terms of Service and Privacy Policy. == Installation == 1. Upload the `langrelay` folder to `/wp-content/plugins/`. 2. Activate through **Plugins** in WordPress. 3. Go to **Settings > LangRelay** and connect your account. 4. Pick your languages. You're live. A free LangRelay account is required. Sign up at [langrelay.com](https://langrelay.com). == Frequently Asked Questions == = How is this different from other translation plugins? = Two big things. First, you only pay for words that actually get translated. If the same sentence appears across your whole site, you pay for it once, not once per page. Second, LangRelay handles GEO (Generative Engine Optimization) with translated llms.txt and AI-readable pages, so your site gets cited by ChatGPT and Perplexity in every language. Most translation plugins don't do this. = Do I need a LangRelay account? = Yes. LangRelay is a cloud service. You can sign up for free at [langrelay.com](https://langrelay.com). No credit card required. = Will this slow down my site? = No. The first visit to a translated page takes a moment while the translation is generated. After that, everything is served from cache. Repeat visitors see translated pages instantly. = What happens if the LangRelay API goes down? = Your site serves the original untranslated page. Nothing breaks. = Does it work with WooCommerce? = Yes. Product pages, shop pages, cart, checkout. All translated automatically. Yoast and Rank Math SEO metadata is translated too. = What is llms.txt? = It's a file that helps AI models like ChatGPT and Perplexity understand your site's content. LangRelay generates one for every page, in every language, so AI search engines can cite your site in international markets. You don't have to configure anything. = Can I try it for free? = Yes. The free plan gives you 1 project, 1 language, and 10,000 credits (words) per month. That covers roughly 20 pages, enough to test on a small site before committing. = Does the free plan show branding? = Yes. Sites on the free plan display a small "Powered by LangRelay" badge next to the language switcher. This is controlled by the LangRelay service based on your plan. Upgrading to a paid plan removes the badge. = What is GEO? = GEO stands for Generative Engine Optimization. It's the practice of making your website visible and citable by AI-powered search engines like ChatGPT, Perplexity, and Google AI Overviews. LangRelay handles this automatically with translated AI-readable pages and llms.txt files. == Screenshots == 1. Settings page: connect your account and configure languages. 2. Language switcher: dropdown style on the frontend. 3. Translation in action: a page served in a different language. == Changelog == = 1.9.2 = * Security: escape hreflang and canonical output with wp_kses(). * Security: use wp_add_inline_script() for translation preloading instead of raw script injection. * Security: eliminate unescaped full-page echo by using ob_start() callback. * Improvement: rename all transient prefixes from lr_ to langrelay_ for consistency. * Fix: stale mock prefix in cache purge test after transient rename. = 1.9.1 = * Security: use wp_safe_redirect() for auto language redirects. * Security: remove token preview from debug REST endpoint. * Security: remove unused debug token authentication methods. * Improvement: bundle country flag SVGs locally instead of loading from external CDN. = 1.9.0 = * WordPress.org plugin review compliance: removed "WordPress" trademark from display name, fixed Plugin URI, properly sanitize all settings fields in register_setting callback, and explicitly close output buffer via shutdown hook. * New: setup wizard now lets you select an existing organization and project instead of requiring a new one. * Removed debug panel from setup wizard. = 1.8.1 = * Fix: languages added in the LangRelay dashboard now auto-sync to WordPress via a project.updated webhook event. * New: manual "Sync" button in the Project Status card to pull the latest project settings (languages, source language) from the dashboard on demand. * Improvement: existing installs automatically reconcile their webhook subscription on the next admin page load to include the new project.updated event. = 1.8.0 = * Dynamic content translation: modals, AJAX panels, and client-rendered content (React, Vue, Svelte) now translate without flickering or invisible text. * Performance: client-side translations are cached in localStorage with automatic version-based invalidation when you edit translations in the dashboard. * Performance: first batch of dynamic text translates immediately (no 300ms debounce delay on initial render). * New: server-side translation map is pre-loaded into the client SDK, so shared strings translate instantly from cache. * New: debug logging via `?langrelay_debug=1` query param or `data-debug="true"` on the script tag for troubleshooting. = 1.7.1 = * Fix: script blocks containing HTML string literals (e.g. WooCommerce gallery scripts building `` and `` tags in JavaScript) are no longer corrupted by the URL rewriter. DOMDocument now skips script and style blocks during URL rewriting. * Fix: translation matching is now case-insensitive. Menu items and other text styled with CSS text-transform (e.g. "wallcoverings" in HTML displayed as "Wallcoverings" via CSS) now match translations regardless of casing. = 1.7.0 = * Email translation: outgoing WordPress emails (wp_mail) can now be translated to the recipient's language. Enable under Settings > LangRelay. * WooCommerce email integration: order confirmations and other WooCommerce emails are automatically translated when email translation is enabled. * Batch translation API: new translate_batch() method for translating plain text strings without HTML overhead. * URL slug routing fix: translated URL slugs are now reverse-translated before WordPress routing, fixing 404s on translated permalink slugs. * Bundled client JavaScript locally instead of loading from an external server. * Various wp.org Plugin Check compliance fixes. = 1.6.0 = * Language switcher block, Elementor widget, and shortcode now support display override attributes (show flags, show names, use native names) * Added [langrelay_switcher] shortcode for placing the switcher in classic themes and page builders * Cleaned up admin settings: removed unused switcher fields, added dashboard link and status indicator * Auto-inject toggle now properly controls whether the switcher script loads * Org slug persisted during OAuth for dashboard deep links = 1.5.1 = * Added Settings link to plugin action row on the Plugins page. * Redirect to settings page on first activation for easier onboarding. = 1.4.7 = * Updated admin UI to match LangRelay brand design. * Added SVG logo to plugin settings header. * Lowered PHP requirement to 8.0 with polyfills. * Added 15 new translation locales (27 total). * Language pills with flags on settings overview. = 1.0.0 = * Initial release. * AI-powered page translation via LangRelay API. * Language switcher (dropdown, list, flags) as Gutenberg block, Elementor widget, shortcode, or auto-injected. * SEO support with hreflang tags and translated meta. * WooCommerce, Yoast SEO, Rank Math, WP Rocket, and Cache Enabler compatibility. * WordPress transient caching for translated pages. == Upgrade Notice == = 1.4.7 = New brand design, PHP 8.0 support, 27 translation locales, and language pills with flags. = 1.0.0 = Initial release.