Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module helps manage complex language path and domain configurations by creating a clear mapping for how languages relate to specific paths, making language switching more intuitive for users. It addresses scenarios where different languages might be hosted on distinct sub-paths or sub-domains.

This module enhances Drupal Language Negotiation URLs. By providing a way to map languages to paths or domains in a way that does not confuse the User when using the Language Switcher.

Take for example a site with a domain called this.example.domain and it has two languages, french and english. Now this site exists on a path, let's say /lives/here for english and /habit/la for french. Now, let's assume the client also wishes prefixes to exist. Such that /lives/here/en is the final path for the english site and /habit/la/fr for the french. I know, sounds crazy, but it happens. The problem with this is that your combination of language paths now look like this:

  • this.example.domain/lives/here/en
  • this.example.domain/lives/here/fr
  • this.example.domain/habit/la/fr
  • this.example.domain/habit/la/en

As you can see, this is not ideal. We really need these to be the following:

  • this.example.domain/lives/here/en
  • this.example.domain/habit/la/fr

This module helps to map the languages to their path prefixes and domains. Ensuring a simple matrix of languages to paths.

In the event you have a site with multiple languages which exists in sub-folders and / or with sub-domains, in one combination or several. These can complicate matters for language switching. Especially since flipping between languages can impact legal or political matters.

This module attempts to provide a simple solution for getting around these problems.

Configuration

Please take a moment to review the documentation and make sure you've properly configured your server for use with this module. The module alone is not enough to make the paths and domains work as desired.

N.B.: There is some server level pathing required in some circumstances.

When using paths and domains which force the Drupal installation cookies to work with complex pathing, you will have to modify the parameters in the *.services.yml file:

parameters:
  session.storage.options:
    cookie_domain: '.localhost'
    cookie_samesite: 'Lax'

Note: If using a wildcard . to denote "anything before the domain", if you are using "domain matrix" the cookie may not work as intended. Either explicitly mark the domain or subdomain component which the cookie will adhere to otherwise user sessions won't work from one language to another.

Optional Modules

If you wish to take advantage of the Keys module to include and work with environment variables, this module makes use of the plugins it provides to create its own group of keys.

Activity

Total releases
7
First release
Jul 2025
Latest release
2 months ago
Releases (12 mo)
7 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
2.0.8 Stable Apr 23, 2026
2.0.7 Stable Mar 18, 2026
2.0.6 Stable Mar 18, 2026
2.0.5 Stable Dec 1, 2025
2.0.4 Stable Dec 1, 2025
2.0.3 Stable Nov 7, 2025
2.0.2 Stable Jul 25, 2025