WPML Multilingual Support and Integration

Updated on 10. 2. 2026

WPML Multilingual Integration

ZiziCache integrates with WPML to keep cache and preloading language-aware. The integration is automatic; there is no dedicated UI switch.

Activation requirements

  • WPML (SitePress) is active and ICL_SITEPRESS_VERSION is defined (version 4.0+).
  • wpml_active_languages returns a valid language list.

What it does

  • Expands ZiziCache preload and auto‑purge URL lists with translated URLs using wpml_permalink for each active language.
  • Adds language variation to file cache names via the WPML cookie wp-wpml_current_language (cache files include a -{lang} suffix).
  • Validates query parameters lang, wpml_lang, and language; invalid values are removed.

What it does not do

  • No WP‑CLI commands specific to WPML.
  • No dedicated admin UI or settings inside ZiziCache.
  • No direct cache purge triggered by WPML events; it only augments existing purge/preload URL lists.

Configuration tips

  • Ensure WPML sets the wp-wpml_current_language cookie (default behavior). This is what ZiziCache uses for language variants.
  • If you use query‑parameter language switching, add your parameter to Cache → Exclusions → Include query params (the default include list already contains lang).

How to verify

  1. Open a page in two languages and confirm different cache files are created with language suffixes under /wp-content/cache/zizi-cache/.
  2. Run a purge (Admin bar → Clear All Cache or wp zizi-cache purge-everything) and confirm preloading includes translated URLs when preloading is enabled.
  3. Check response header x-zizi-cache-cache for HIT/MISS/BYPASS to confirm caching behavior.

Disable the integration (optional)

add_filter('zizi_cache_disabled_integrations', function($integrations) {
    $integrations[] = ZiziCachePluginsIntegrationsWPML::class;
    return $integrations;
});
What are your feelings