Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Multilingual Menu URLs

Security covered Under active development 539 sites

This module allows you to provide different URLs for external links in your Drupal menus based on the language of the menu item. It replaces the standard link and title fields with language-specific versions when enabled for a translated menu item, eliminating the need for separate menus for each language.

The "link" field for menu items is not translatable - this is fine for internal links since Drupal knows which version to reference automatically.

This can be a problem for external links, as there might be a need to provide a different URL based on the link language.

This module creates a "Provide Translated External Link" option in the menu link form for translated items.

When enabled, it replaces the Link and Title fields with versions that are language specific.

The current recommendation is to create language specific menus. This module eliminates the need for that.

Currently, the revised links get added in a preprocess hook.

Requirements

No special requirements. Requires menu_link_content from Drupal core.

Install

Install module via composer or via standard Drupal module install practices.

composer require drupal/multilingual_menu_urls

Enable via Drush:

drush en multilingual_menu_urls

Usage

  • Install and enable module.
  • Make Custom menu link translatable (admin/config/regional/content-language).
  • Exclude "Provide Translated External Link" & "Translated Link" from being translated.
  • Add menu link to a menu for default language and set external link.
  • Translate menu link for another language and you should see "Provide Translated External Link" checkbox.
  • Check the box and provide the translated information as needed.
  • Save menu item.
  • Test out menu links in the translated languages.
Drupal 8–10 · not 11

Ask your assistant about Multilingual Menu URLs

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • menu_link_content 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
Aug 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Releases

Version Type Core PHP Release date
8.x-1.2 Stable 8–11 Nov 20, 2024
10.0.1 Stable 8–10 Aug 9, 2023