Using translation multilingual plugins with WP Rocket

Automatic compatibilities

WP Rocket has automatic compatibility with the following multilingual/translation plugins:

WPML

  • WP Rocket will detect your language configuration and will cache/purge/preload the content.
  • You have the ability to empty/preload the cache for a specific language or for all languages at the same time.

    clear cache languages

WooCommerce Multilingual

  • This is an add-on for WPML. WP Rocket uses dynamic and mandatory cookies to provide compatibility for the currency switcher and geolocation.
  • When the Geolocation option is active, this cookie: wcml_client_country must be set in the visitor's browser before caching will start.
  • Specific cache files will be created for each value of the following cookies:
  • wcml_client_currency
  • wcml_client_currency_language
  • wcml_client_country

Polylang

  • WP Rocket will detect your language configuration, and will cache/purge/preload the content.
  • You have the ability to empty/preload the cache for a specific language or for all languages at the same time.

Polylang browser language detection

When using Polylang's browser language detection feature, note that the first visit for each user will be uncached so that the language can be accurately detected. Once the cookie that stores their language, pll_language, has been set in the visitor's browser, caching will be activated.

Redirect to default language

If you have set up Polylang to have each language in a sub-folder, e.g. https://example.com/de, with a redirect from the homepage to the default language, you may find that the redirect doesn't work as expected. 

The solution is to exclude the homepage from the cache. 

In WP Rocket, go to Advanced Rules → Never Cache URL(s) and enter:
/

This will allow the redirect to work reliably.

TranslatePress

From the 3.14.4 version, WP Rocket is compatible with the TranslatePress plugin from version 2.5.7 or higher.

  • When doing regular update of a specific post, WP Rocket will clear the cache of all versions of translated content.
  • When updating the post using TranslatePress UI, WP Rocket will clear the cache of updated language versions.
  • You have the ability to empty/preload the cache for a specific language or for all languages at the same time.

Other multilingual plugins

GTranslate

Some GTranslate configurations do not support caching, therefore it will not work with WP Rocket. For more information, refer to the article: Using GTranslate with WP Rocket.

Weglot

Weglot's team has developed partial compatibility from their side, using WP Rocket's mandatory cookie approach.

When Weglot's "Auto redirection" option is checked, a language cookie will be set in the visitor's browser, and, from the next page reload, WP Rocket will serve the cached page for the default language.

However, the auto-redirection as such won't work, the visitors still need to use the language selectors to be redirected to the additional languages in needed.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.