There are currently quite a few places in Drupal Core that generate lists of languages for settings -- some of which are real languages, like "English", "Spanish"; some of which are "derived" languages, like "The detected/selected language of the current page for purposes of UI text".
These lists are generated from different code in different places, and are unfortunately currently not consistent with each other. This can lead to confusion for the user. On, we at least made sure that in Views, when we list languages, we do it in a uniform way and use the names from the Detection Selection settings page for those "derived" languages. But it's still not consistent with the Content Language settings, and the order can be confusing.
We also confuse users by showing them more choices than appropriate.
Anyway, here's the current state [before any patches] of language lists and language names:
a) On the Detection and Selection settings page, the two possibly configurable "language detection" choices are "User Interface text" [configurable by default], and "Content" [not configurable by default].
So we should not show the "Content" page language choice in any language lists.
Also note that the terminology on this page is "detection" and "selection". Not "current language" or anything like that.
Also, the name "User interface text" is unnecessarily wordy -- makes some of the choices in lists below very long -- so it could be changed to "Interface text".
b) The language settings from the Content Translation settings page, when you set up a particular content type to be translatable:
Problems with this list:
- It says "Current interface language", which is hard to relate to what you see on the Detection Selection page, which is "User interface text" and "selected" or "detected", not "current".
Note: This choices list is also visible if you go to edit a content type, in the vertical tabs at the bottom, in the Language tab.
c) If you create a view of a translatable entity (like Node), there is a setting for the Rendering Language of the view:
Problems with this:
- Should not contain "content language selected for page", because this is not currently configurable.
- Order is not consistent with the Content Type language settings.
On the plus side, it does say "selected" and "User interface text" language to match the Detection and Selection page. This is by design: the list is generated from the labels that are defined by the Detection and Selection process, so if these labels change, the Views list will also change.
d) If you create a Views language filter, you get these choices for the value:
This is the same as (c) and generated from the same code, except missing the "row" choices because they do not apply to filters, and with the additional "not specified" language choices, which do not apply to the row rendering language settings.... So we don't need to think about this aside from thinking about (c).
Notes on how to make screen shots
With or without the patch, start up a simplytest.me and do the following to make the screen shots:
- Standard install profile in English [for faster site building, disable the update checking checkboxes from the config screen so that translations will not be imported -- you don't need them for the screenshots]
- Enable the 4 multilingual modules - from admin/modules [technically, Config Translation is not required]
- Add Spanish and French languages - from admin/config/regional/language
- Go to the Detection and Selection tab and take a trimmed screen shot of this page for (a) - admin/config/regional/language/detection
- Make Article and Page nodes translatable - from admin/config/regional/content-language - and take a trimmed screen shot of the Default Language choices for (b).
- Go to the Views page - admin/structure/views - edit the default Content admin view - admin/structure/views/view/content
- Click on the link next to "Rendering language" and take a trimmed screen shot of the language choices for (c).
It would be good if:
1) All language lists were using the same wording for all of the "derived" languages.
2) The "derived" languages that relate to the detected/selected languages for the current page used the same or similar UI text as the detection/selection page.
3) All language lists are as much as possible in the same order.
4) For detection/selection derived languages, hide choices that are not configurable, unless that one has already been selected as the current choice.
The current patch makes updates to all of the screen shots above. Here's what it's doing:
a) Detection and selection page: "User interface text" becomes just "Interface text". Screen shot:
b) The language choices for content types become:
This is now fixed. The "Current interface language" choice has been renamed "Interface text language selected for page", so it matches (a) well.
c) The language choices for views rendering become:
This is improved:
- The order has been updated so that the derived languages are first
- The order matches the Content settings page (b) as much as possible
- The labels of a couple of the choices have been changed - "User interface text" becomes "Interface text" as in (a)
- Non-configurable choices are hidden [the Content selected language is hidden]
The patch also adds tests to make sure that non-configurable choices are shown if they are the current choice in Views.
User interface changes
The order and labels for various language lists and settings page are more concise and consistent. Non-configurable choices are hidden. The current choice, however, is always shown so that if the list of configurable languages changes, the current choice is still shown.
Beta phase evaluation
|Issue category||Task, because it is a code/UI improvement, not exactly a bug but a consistency improvement.|
|Issue priority||Normal, not critical or major in any way, just a small glitch.|
|Prioritized changes||The main goal of this issue is usability improvement, so it is prioritized.|
|Disruption||Not disruptive. This just updates the UI.|
|#86||interdiff.txt||1.21 KB||Pere Orga|
|#86||2420737-86.patch||23.82 KB||Pere Orga|
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 94,647 pass(es). View
|#82||interdiff.txt||4.15 KB||Pere Orga|
|#82||2420737-82.patch||23.83 KB||Pere Orga|
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 92,823 pass(es). View