Affects Version/s: 7.2.X, Master
Component/s: ~[Archived] WCM
Language selector should display all language names in their own translation (English, Deutsch, Español, Magyar, etc.). However, the word "English" is always translated for some reason to the current language (Englisch, Inglés, Angol, etc.)
- Set up and start a bundle (keep en_US as the default language)
- Create a new site with a widget page
- Put a Language Selector portlet on the page
- Configure the Language Selector portlet to use the "Select Box" template
- Verify that the current language is "English"
- Use the language selector to switch to another language, e.g.: Spanish ("Español")
- Check the list of languages again in Language Selector portlet
Actual: English is displayed as translated to current language, e.g.: "Inglés"
Expected: English is displayed as "English"
It seems like the main reason is that the word "English" has translation on every single language. E.g. in Language_hu.properties#L1844:
This is the FTL pattern, where it renders the select box: portlet_display_template_select_box.ftl. Here, the value of entry.getLongDisplayName() is still "english", however, the JSP part that actually renders the <option> tag, uses it as a language key.