Skip to main content
KadiCache
Browse 37 Docs Guides & Search

Multilingual & Multi-Currency Caching (WPML, Polylang, CURCY & FOX)

Isolate cached HTML cleanly across 8 multilingual plugins (WPML, Polylang, TranslatePress, Weglot, Bogo, qTranslate) and multi-currency switchers (CURCY, FOX/WOOCS, WCML, WooPayments).

Integrations/Multilingual/ProviderRegistry.phpIntegrations/Multilingual/LanguageDomains.phpIntegrations/Plugins/Curcy.phpIntegrations/Plugins/FoxCurrency.php
WP Admin -> KadiCache -> Tools & Diagnostics -> Cookies & Query Rules
MODULE 30 · 2X RETINA
Fine-grain bypass cookies, currency/language variant cookies, user-agent exclusions, and tracking query parameter stripping.2880×1840 WebP
Quick Summary · 30-Second Operational SpecSource-Verified Guide
WP Admin Path
WP Admin -> KadiCache -> Tools -> Cookies & Query Rules
Expected Outcome
8 Multilingual Plugins · 5+ Multi-Currency Engines · SHA-256 Variant Isolation
Key Marker / Engine
ProviderRegistry.php | LanguageDomains.php | Curcy.php | FoxCurrency.php
  • Auto-detects 8 multilingual plugins (WPML, Polylang, TranslatePress, Weglot, qTranslate-XT, Bogo, WP Multilang, Universally) via ProviderRegistry.php—supporting /ar/ subdirectories, fr.example.com subdomains, and separate ccTLD domains (LanguageDomains.php).
  • Synchronizes translation-group cache invalidation (TranslationGroupCapture.php) and multilingual XML sitemaps (including clean decoded Arabic/Unicode URLs in Preload).
  • Isolates multi-currency prices cleanly across CURCY (Curcy.php), FOX / WOOCS (FoxCurrency.php), WPML WooCommerce Multilingual (WcmlCookieRenewal.php), WooPayments Multi-Currency, and Price Based on Country (WCPBC).
  • Hashes recognized variant cookies into deterministic SHA-256 cache buckets (CookieVariants.php)—raw cookie strings never touch filesystem paths.

Preventing Cross-Language & Cross-Currency Cache Mix-Ups#

International WordPress publications and global WooCommerce stores face two perilous caching failure modes when using generic page-cache plugins:

  1. Currency Price Poisoning: A European shopper switches your store currency to EUR (€), triggering a cache rebuild on /product/leather-weekender/—and five seconds later, an American shopper opening that same URL sees €240 instead of $260!
  2. Cross-Language & Cross-Domain Asset Errors: A bilingual English + Arabic (RTL) site using separate domains (example.com and example.ae) or cookie-driven language switching serves English navigation menus on Arabic URLs, or triggers browser CORS failures on minified fonts and CSS.

KadiCache Free Core (ProviderRegistry.php, LanguageDomains.php, TranslationGroupCapture.php, Curcy.php, FoxCurrency.php, and WcmlCookieRenewal.php) detects your active multilingual and currency stack automatically with zero manual regex rules.

FIG 01Managing Variant Cookies, Bypass Cookies, and Query String Rules inside WP Admin -> KadiCache -> ToolsZoom 2x

Native Auto-Detection for 8 WordPress Multilingual Plugins (ProviderRegistry.php)#

ProviderRegistry::current() inspects active WordPress constants and APIs to register the exact LanguageProvider implementation for your site:

Multilingual PluginFree Core Provider ClassSupported URL Topologies & Invalidation Behavior
WPML (ICL_SITEPRESS_VERSION)WpmlProvider.phpSubdirectories (/de/), subdomains (de.site.com), separate domains, language cookies & trid translation-group purges
Polylang & Polylang ProPolylangProvider.phpSubdirectories, subdomains, multi-domain origins (LanguageDomains), pll_language cookie variants & linked post purges
TranslatePress (TRP_PLUGIN_VERSION)TranslatePressProvider.phpLanguage URL slugs (/es/, /ar/), RTL output buffers & shared translation invalidation (SharedTranslationInvalidation.php)
Weglot (WEGLOT_VERSION)WeglotProvider.phpTranslated subdirectory routes & translated HTML output caching
qTranslate-XT (QTX_VERSION)QtranslateProvider.phpPre-path (/fr/), query (?lang=fr), and cookie language modes (QueryLanguageVariants.php)
Bogo (BOGO_VERSION)BogoProvider.phpNative WordPress locale routing & translated post invalidation
WP Multilang (WPM_VERSION)WpMultilangProvider.phpLocale prefix routing & default-language origin resolution
Universally (UNIVERSALLY_VERSION)UniversallyProvider.phpUnified buffer translation caching across configured target languages

Multi-Currency Isolation Across WooCommerce Switchers#

How a currency switcher stores the visitor’s chosen currency (Cookie vs PHP/WC Session vs GeoIP) determines how KadiCache caches or isolates it safely:

Multi-Currency PluginStorage MechanismKadiCache Automatic Handling
CURCY – Multi Currency for WooCommerce (Curcy.php)wmc_current_currency cookieHashed Cache Variant — caches separate USD, EUR, GBP, SAR snapshots at ~14 ms Early HIT speed!
FOX – Currency Switcher (WOOCS) (FoxCurrency.php)Cookie mode vs PHP Session / Transient modeCaches per currency when configured in Cookie storage; safely bypasses shared cache if FOX is left in server-side PHP session/transient mode so prices never mix!
WPML WooCommerce Multilingual (WCML) (WcmlCookieRenewal.php)WCML currency & language cookiesSynchronized Variant & Cookie Renewal — serves fast per-currency/per-language variants cleanly
WooPayments Multi-Currency (WooCommerceSession.php)Session / Geolocation currencyDetects is_customer_multi_currency_enabled() & auto-currency GeoIP (woo_geolocation_currency / woo_session_currency)
Price Based on Country (WCPBC)Country session / AJAX caching modeHonors wc_price_based_country_caching_support when enabled, or isolates country sessions safely
FIG 02Viewing cleanly decoded Arabic and English URLs inside WP Admin -> KadiCache -> PreloadZoom 2x

Adding Custom Variant Cookies (Tools -> Cookies & Query Rules)#

If your agency builds a bespoke B2B storefront switcher—such as a cookie named store_region (us, eu, uk) or vat_display (incl, excl)—open WP Admin -> KadiCache -> Tools -> Cookies & Query Rules:

TEXTRegistering Custom Variant Cookies (One Exact Cookie Name Per Line)
# Variant Cookies create separate SHA-256 hashed cache files per cookie value
store_region
vat_display_mode
  • Important Distinction: Put low-cardinality public preferences (3–10 shared values like USD/EUR/GBP) in Variant Cookies. Put unique per-user tokens (like member_auth_jwt) in Rejected (Bypass) Cookies so you never create thousands of single-user cache files.

Multilingual Sitemap Warmup & Edge CDN Coordination#

To keep every language and regional storefront hot around the clock:

  • Automatic Multilingual Sitemap Discovery: PreloadDiscovery.php reads translated URL entries emitted by Yoast SEO, Rank Math, WPML Sitemaps, and Polylang automatically—warming /en/, /de/, /fr/, and /ar/ pages in bounded batches without manual URL lists.
  • Cloudflare & Varnish Multi-Domain Sync: When using separate language domains (example.com, example.de, example.ae), LanguageDomains.php ensures single-post updates purge the matching URL across both local cache and Varnish / Cloudflare edge zones cleanly.
  • Intact <link rel="alternate" hreflang="..."> & Translated Checkout Paths: Cached HTML snapshots retain every SEO hreflang header and canonical tag emitted by your translation plugin while keeping translated /kasse/, /panier/, and /سلة-المشتريات/ cart/checkout slugs strictly uncached.

Frequently Asked Operational Questions

Does KadiCache support WPML or Polylang configured with separate domains per language (example.com and example.fr)?
Yes! LanguageDomains.php resolves active secondary language domains across early delivery, minified CSS/JS asset URLs, Varnish purges, and Sitemap Preload so cross-domain multilingual sites work without CORS errors.
Are Arabic, Hebrew, Cyrillic, or Japanese percent-encoded URLs readable inside the Preload queue?
Yes. KadiCache normalizes percent-encoded non-ASCII paths cleanly on disk while decoding Unicode/Arabic slugs cleanly inside WP Admin -> KadiCache -> Preload for human readability.
Can malicious requests send random Variant Cookie values to fill up my disk?
CookieVariants.php enforces strict cookie-value length limits, sanitization, and SHA-256 hashing alongside FileCache’s bounded ledger (20,000 entries / 1 GiB cap with automatic eviction).
When I update an English blog post in WPML or Polylang, do French and Arabic switcher links update too?
Yes! TranslationGroupCapture.php and MultilingualLifecycle.php capture linked translation URLs before and after post updates so language switcher menus and translated archives stay synchronized.
Does Cloud Remove Unused CSS support right-to-left (RTL) stylesheets on Arabic and Hebrew pages?
Yes. RTL selectors ([dir="rtl"], .rtl) and directional layout rules are preserved cleanly on RTL pages.
Gergis — Lead Systems & Cache Architect
Principal WordPress & Cloud Edge Architect
E-E-A-T Source Verified

Creator of KadiCache’s Early PHP Drop-In, 7-Driver Object Cache Engine, Cloud Remove Unused CSS, and Zero-CLS Lazy Render pipeline.

apps/wordpress-plugin/src/Integrations/Multilingual/ProviderRegistry.phpapps/wordpress-plugin/src/Integrations/Multilingual/LanguageDomains.phpapps/wordpress-plugin/src/Integrations/Plugins/Curcy.phpapps/wordpress-plugin/src/Integrations/Plugins/FoxCurrency.php
Was this engineering guide helpful?