Allow preferred language selection for link field

Created on 18 November 2017, over 7 years ago
Updated 6 July 2025, about 14 hours ago

Problem/Motivation

In multilingual sites it's currently not possible to select a specific translation for internal path's when creating links. For instance, I have a Dutch/English site:

  • Node 1 is the homepage and has a translation for both languages.
  • Node 2 is a Dutch node with a link field set to link to node 1.
  • When showing the link on node 2, I want the link to go to the English translation of Node 1.

I ran into this while trying to find a solution for #2845245: Allow Redirecting to another language .

This seems to be related to the following issues:
🐛 Language prefix for custom menu link paths are saved but not used Needs work - The menu link doesn't use the entered language prefix, having a seperate language selection field will make the destination language explicit.

🐛 Untranslated menu items are displayed in menus Needs work - Menu links can have a language and it would be nice to only habe Dutch menu links show up in the Dutch menu. When you can have a Dutch menu link but link it to a English translation, this will allow for more flexibility.

🐛 Entity reference autocomplete lists entity labels only in current content language Needs work - The entity_autocomplete form shows available entity titles in the translation of the current interface language. This doesn't mean you will actually get a link to that specific translation. It would help to explicitly choose the preferred language of the destination.

Proposed resolution

Allow a preferred language for link fields.

Remaining tasks

User interface changes

Optionally added select list for 'Preferred language' to link fields.

API changes

None

Data model changes

None

Feature request
Status

Needs work

Version

11.0 🔥

Component

link.module

Created by

🇳🇱Netherlands seanB Netherlands

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024