Make the language switcher configurable and extensible

Created on 13 November 2013, over 10 years ago
Updated 8 September 2023, 9 months ago

Problem/Motivation

In Drupal 7, the language names in the language list show up as localized to their native names. In Drupal 8 native names don't exist anymore as a concept, however language names are translated to any other language just as well as any other configuration entity.

We should provide the ability of configuring the language switcher block to use the current language name, the localized language name or language codes (which is a common request), and provide ways of extend this from contrib (languageicons, lang_dropdown, I'm looking at you)

Proposed resolution

- Make the block configurable for showing language codes or language name.
- If locale is enabled, make the block configurable for showing language name or localized language name.
- Make the display configurable between this behavior and others that could be provided by contrib, so we only have one configurable "Language switcher block" instead of confusing multiple ones.

Remaining tasks

User interface changes

- New setting in the block configuration for language switchers
- Display of language switcher changes based on configuration.

API changes

None.

Related Issues

🐛 Language switcher label cannot be changed for English Active

📌 Task
Status

Active

Version

11.0 🔥

Component
Language module 

Last updated about 1 month ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • 🇩🇪Germany Anybody Porta Westfalica

    This issue is supposed to fix the current core bug at: 🐛 Language switcher label cannot be changed for English Active

  • Status changed to Needs review 9 months ago
  • 🇮🇳India sakthi_dev

    The issue is not reproducible in Drupal10. Tried to reproduce but found it works as expected listed down the steps followed.
    1. In a Vanilla Drupal, installed the Drupal in German.
    2. Added English under Language (/admin/config/regional/language).
    3. Installed the Configuration Translation module.
    4. Translated the Language->English Configuration with required value.
    5. Got the expected result after placing the language switcher block.
    Please let me know if I'm doing wrong.

  • Status changed to Active 9 months ago
Production build 0.69.0 2024