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 provides a language switcher that integrates directly into your website's menus. It displays the current language as the main item with other languages as sub-options, offering a cleaner alternative to block-based switchers. You can configure which menus display the switcher and customize its appearance, including the option to show language flags.

A language switcher to be placed as a menu item.

Differently the majority of language switchers who uses a block, this module uses a tree menu with the current language as principal item and the child items for the other languages. If there are only 2 languages active, the menu show the alternative language to switch to and no child items (issue #3540403).

In this manner it's possible put the switcher in one or more menus and if necessary, afterwards with the Menu UI, in any place in the tree. The module only puts the links and then uses the rules of the menu/theme, so also permits the use of hooks, class, themes, etc. as part of a normal menu.

Features

  • integration and transparency with the menu system and themes;
  • integration with other language switchers (blocks);
  • a more ergonomic solution with all the links in just one place, the menu.

Post-Installation

Use your preferred way to install the module (unpack the zip into modules folder, composer/drush, administration "Extend" page, etc.).

Once installed, before configure it, some checks are needed:

  • at least 2 language configured in /admin/config/regional/language;
  • in "Interface text language detection" and/or "Content language detection" in /admin/config/regional/language/detection, the URL detection method has enabled and with priority on other methods.

With the language configured, it's possible configure Language Links On Menu from /admin/config/regional/llom:

  • select the menus where display the switcher;
  • according to "Detection and selection" above, select the language type. If both suit the site, a priority has done to "Interface text";
  • set the weight, principally to put the switcher at the begin or the end of the items
  • select the test format, full for "English" or short for 2 characters ISO like "EN";
  • select if insert a flag and where places it compared to the text or only the flag without text (the files must be put in the site public:// folder).

After has configured the module, if necessary uses Menu UI for a finest position of the switcher. Almost all UI settings are preserved.

The module preserves the theme classes, but adds new classes for menu and language for a precise styling of the switcher.

Additional Requirements

This module depends on the language and menu_ui modules provided by Drupal core.

Similar projects

Language Switcher Menu (who I'm inspired), but it adds a new main item for every language, so with a large number of languages the menu will filled. Moreover only one menu or sub menu at time.

Attention

About the flags. The module doesn't check if the language flag has loaded in the public:// folder or if the filename is correct (ISO code dot png, for example en.png) or its dimensions are right and so on. All these points are responsability of the site or theme developer. More, the JQuery script who insert the flags, could add some CSS class/style and/or HTML tags for shows the flags.

Do a menu reset from Menu UI, if manually has configured some menus, before remove the menu selection from module configuration, otherwise the switcher could be showed again.

If the menu doesn't use levels, for example, the child items (the other languages) will not showed.

When a language has added or removed, the module does a rebuild of all menus.

Activity

Total releases
1
First release
Oct 2025
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.3 Stable Oct 31, 2025