Problem/Motivation
The languages in the language switcher are not translated and neither is the string 'Language switcher'. The text for 'Language switcher' does have an Italian and German translation at /admin/config/regional/translate. The block, 'language switcher' does not have translations for the text 'Language switcher'.
Hello,
I am having an issue if there is possible that we can add translation for language switcher block.
Use case: When we select language, other languages in menu should be translated in selected language.
Example:
We select German language and in the language bar should show "Deutch Englisch Französisch".
and when we select English language should be "German English French"
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | after(de).png | 256.24 KB | kumudb |
| #13 | de.png | 64.8 KB | sakthi_dev |
| #13 | fr.png | 63.27 KB | sakthi_dev |
| #13 | en.png | 56.78 KB | sakthi_dev |
| #13 | language-switcher-title-translatable-2959580-13.patch | 791 bytes | sakthi_dev |
Issue fork drupal-2959580
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 2959580-language-switcher-languages
changes, plain diff MR !11752
Comments
Comment #2
alesbencina commentedComment #10
quietone commentedI tested this on Drupal 10.1.x, standard install with English, Italian and German. The text displayed in the language switcher was always a mix of English and German.
I looked for duplicates didn't find any.
Comment #11
quietone commentedThis may be a duplicate of #2135379: Make the language switcher configurable and extensible
Comment #12
sakthi_dev commentedComment #13
sakthi_dev commentedCreated a patch for making the title translatable. Please review.
Comment #18
kumudbComment #19
smustgrave commentedComment #21
jorisclaes commentedI had the same problem in 11.4.1
After some searching, I found the following: the core team decided to show the language label in its native language.
This is because it can be difficult to find the correct link when you do not speak the language.
I agree with their decision.
For example, try setting your phone to Japanese or another language and then try to find a specific setting :)
Source: https://www.drupal.org/project/drupal/issues/2107427#comment-8602897
If you want to alter this behavior, you can use a module, like https://www.drupal.org/project/dropdown_language
or implement a hook like