Menu block current language
This module provides a replacement for the core Menu block that filters out menu links not translated into the current language. This ensures that only relevant menu items are displayed to users based on their language preference.
At the moment, all menu items are displayed regardless of it being translated or not. Menu block current language attempts to resolve this by providing a replacement for core's Menu block that filters out the untranslated menu links.
Usage
In order for this module to have any effect, you must replace menu blocks provided by the System module with menu blocks provided by this module.
Supported menu link types:
- Custom Menu Links (Drupal\menu_link_content\Entity\MenuLinkContent)
- Views menu links (Drupal\views\Plugin\Menu\ViewsMenuLink)
- String translated links
See: https://www.drupal.org/node/2466553 for more details.
Versions
- 2.x: Requires Drupal 9.3+ or 10.0+, PHP 8.0+
- 8.x-1.x: Drupal 8 and 9 support. Supports PHP 7.4+. No further development
Installation
composer require drupal/menu_block_current_language
Similar modules
Depends on
Dependencies of the latest stable release
- block Drupal core
- locale Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 2.0.1 | Stable | 9–11 | Drupal 11 support | Feb 21, 2025 |