Plugin Support
Alex
(@alexcozmoslabs)
Hi,
We tested your site on both desktop and mobile (including incognito mode), and in our case, the issue was not reproduced — the site consistently loads in the default language, Brazilian Portuguese, as expected.
Do you have any Browser Language Detection plugin?
If not, maybe caching or CDN services (like Cloudflare, LiteSpeed, etc.) might serve cached pages in the wrong language if the language is stored in the URL or cookie.
Thanks for replying. We use wprocket to manage cache and cloudflare cnd.
Plugin Support
Alex
(@alexcozmoslabs)
Hi,
We did not encoutner the issue on your website, so we assume it’s working fine now.
If you will encounter the behaviour again, check/clear your cache system.
Best Regards,
-
This reply was modified 11 months ago by
Alex.
Hello. The problem actually still persists. If it could be a conflict with the cache and the CDN, is there anything that can be done?
Plugin Support
Alex
(@alexcozmoslabs)
Hi,
Do you use for some reason the Automatic User Language Detection Add-On from us?
It is not in use. For some reason it seems to have stabilized after I removed some transients. I will monitor it to see if it remains stable.
Thanks.
Hello again. When I thought it was stable, it was just clearing the cache. As soon as the cache is full, the language on the mobile device appears in any random way, and only after clearing the entire cache does the default language appear.
Can’t you help us with this?
Thank you.
Plugin Support
Alex
(@alexcozmoslabs)
What you’re experiencing sounds like a caching-related issue, which can occur when full-page cache systems (from plugins, hosting, or CDNs like Cloudflare or LiteSpeed) serve the wrong cached version of a page — often in the wrong language — to users.
Since TranslatePress stores the selected language in a cookie (not in the URL, unless you’re using the subdirectory or subdomain URL structure), the caching system might not be varying the cache based on that cookie, leading to pages in different languages being randomly served to users.
Here’s what we recommend:
- Configure cache to vary by language cookie
If you’re using any caching plugin or server-level caching, make sure it’s set to vary or exclude cache based on the trp_language cookie. This ensures each language version gets its own cached version.
- Mobile caching
Some caching tools treat mobile and desktop differently. Make sure your cache doesn’t combine mobile and desktop content or incorrectly serve one to the other.
- CDNs or server-side caching
Make sure these are also set up to vary by cookie or exclude language-based pages from aggressive caching. With Cloudflare, for example, you can create a Page Rule or Cache Rule to bypass caching for trp_language-dependent pages.
We understand this can be frustrating, especially when it appears to work after clearing the cache. That’s a strong indicator the caching layer is not differentiating between language versions correctly.
Thanks for replying. The rule to be created in cloudflare to ignore the cache for trp_language, would be for which type of field? See the example I made in the image to see if it would be correct please.
https://www.adamatecidos.com.br/wp-content/uploads/2025/06/print.png
-
This reply was modified 10 months, 3 weeks ago by
cris123pp.
Plugin Support
Alex
(@alexcozmoslabs)
Hi,
In Cloudflare, the ideal setup is to create a Cache Rule that bypasses cache when the trp_language cookie is present.
The attached link is not accessible from what’ve checked.
Please note that we’re not Cloudflare specialists, so this is just a general recommendation:
- Go to Rules > Cache Rules in your Cloudflare dashboard.
- Create a new rule with:
- Field:
Cookie
- Operator:
contains
- Value:
trp_language=
- Choose Bypass cache.
They may have other settings. Feel free to reach their support for more details.
Plugin Support
Alex
(@alexcozmoslabs)
You are welcome.
Kind Regards,