Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: MCP Sentinel 2.33.0 — Minor update available for module mcp_sentinel (2.33.0). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Language Cookie

1,235 sites Security covered Drupal 10–11
View on drupal.org

This module allows you to set the site's language based on a browser cookie. You can configure the cookie's name, domain, and expiration time in the module's settings.

Adds an extra "Cookie" field to the Language Negotiation settings, allowing the language to be set according to a cookie.

The cookie name, domain & expiration are configurable in the settings page.

Usage

  • Enable the module and go to: Administration » Configuration » Regional and language » Languages
  • Enable the "Cookie" detection method and re-arrange the detection methods as you see fit. The recommended arrangement is: "URL -> Cookie".
  • If you a language selection splash screen is needed, the Language Selection Page module is recommended. In this case, the recommended setup is: "URL -> Cookie -> Language Selection Page".
  • For the cookie to be set properly on cached pages, the variable page_cache_invoke_hooks has to be set to TRUE. This can be done by adding the following line to your settings.php file: $conf['page_cache_invoke_hooks'] = TRUE;

Major versions

Versions 1.x of this module requires prefix/domain based interface language detection, whereas version 2.x will attempt to get the language from any interface language provider with a lower weight than the Cookie language type. For instance, arrangements such as "Session -> Cookie" should also work now.

Related modules

  • User Account Language Negotiation saves the visitor's language choice to their user account instead of a browser cookie. This means the preference follows the user across browsers and devices, but only works for logged-in users (not anonymous visitors).

Depends on

Dependencies of the latest stable release

  • language Drupal core
  • path_alias Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2024
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
2.0.3 Stable 10–11 Aug 20, 2026
2.0.2 Stable 10–11 Sep 12, 2024