What is the _icl_visitor_lang_js cookie?
_icl_visitor_lang_js is a first-party cookie set by WPML, one of the most widely used translation plugins for WordPress. It runs on any WordPress site using WPML with automatic language detection or switching enabled.
The cookie typically appears on the first visit to the site, as soon as WPML's JavaScript runs on the page, regardless of whether the visitor actively interacts with the language switcher.
What data it stores
The cookie stores a language code (for example "en", "ro", or a similar code matching the languages configured in WPML), reflecting the language the visitor last saw or chose on the site.
The value is read and written locally by JavaScript, directly in the visitor's browser; it is not sent to WPML's servers or any third party, and it stays on the site's own domain.
What it is used for
The purpose is purely functional: it lets the site remember the visitor's language preference across pages, so they are not forced to pick a language repeatedly.
For the site owner, this cookie helps deliver a more consistent browsing experience on multilingual sites, reducing confusion and drop-off caused by repeated language switching.
Does it require consent?
In CookieFix's classification, _icl_visitor_lang_js falls under the preferences (functional) category.
- It is not strictly necessary under ePrivacy, since the site can still function without it — visitors would simply need to reselect their language.
- As a preference cookie, it should ideally be set only after the visitor has given consent, in line with the ePrivacy Directive (2002/58/EC) and equivalent national implementations such as Romania's Law 506/2004.
- Site owners should list it explicitly in their cookie policy, naming WPML as the provider along with its actual observed duration.
How to block or delete _icl_visitor_lang_js
Visitors can delete or block this cookie at any time from their browser settings (Chrome, Firefox, Edge, Safari) under the site data/cookie management section; the effect is that the language preference will no longer be remembered automatically.
At the site level, a CMP such as CookieFix can automatically block the WPML script that sets this cookie until the visitor consents to the preferences category, letting it run only after acceptance.
Frequently asked questions
It is a cookie set by the WPML plugin on multilingual WordPress sites, used to remember the visitor's selected or detected language.
Yes, since it is classified as a preference/functional cookie and is not strictly necessary for the site's basic operation, it should only be set after the visitor gives consent.
The typically observed duration is 1 day, though this can vary depending on the WPML configuration on a given site.
Visitors can block or delete it from their browser settings, and site owners can use a CMP that blocks the WPML script until consent is obtained.