While designing #367595: Translatable fields we agreed that we would need to distinguish between UI language and content language: the first one would allow a user to choose in which language display the site interface textual elements, the second one would be associated to content; the two types might be partially or even totally unrelated as one might want to enable more content languages than UI ones or viceversa.
The current patch slightly modifies the language configuration page to enable the admin to choose which type the language has; this setting is recorded in an additional column of the languages
table. An upgrade path is provided.
Comment | File | Size | Author |
---|---|---|---|
#22 | ui_content_language-533924-19-config.png | 23.87 KB | plach |
#22 | ui_content_language-533924-19-overview.png | 26.41 KB | plach |
#19 | ui_content_language-533924-19.patch | 23.36 KB | plach |
#17 | ui_content_language-533924-17.patch | 22.87 KB | plach |
#11 | ui_content_language-533924-11.patch | 21.45 KB | plach |
Comments
Comment #1
plachComment #3
sunsubscribing
Comment #4
plachfixed a simpletest
Comment #5
plachslightly reworked patch
Comment #6
alexanderpas CreditAttribution: alexanderpas commentedlooking nice, yet tests to actually test the different added options seem to be missing, as the only thing being tested seems to be
LANGUAGE_TYPE_ANY
Comment #7
plach@alexanderpas: thanks for the review, this patch was created as part of a proof of concept work so initially I did not provide any specific test. In the current one the new functionalities have their own tests (I discovered a bug thanks to them :).
Comment #9
plachrerolled
Comment #11
plachI forgot to fix my own tests :(
Comment #12
alexanderpas CreditAttribution: alexanderpas commented- testbot seems to be happy...
- I like where this patch is going
- the admin interface is not optimal (but sufficient)
Comment #14
sun.core CreditAttribution: sun.core commentedComment #16
sunTagging.
Comment #17
plachStraight reroll.
Comment #19
plachmy own tests...
(sigh)
Comment #21
alexanderpas CreditAttribution: alexanderpas commentedhead broke -- resetting status
Comment #22
plachA couple of screenshots to help people understanding what's going on here.
Comment #24
plachComment #25
plachComment #26
Gábor HojtsyHow do you imagine other language types would work with this?
(Also IMHO moving a feature request to D8 is in itself postponing from Drupal 7, so no need to set to postponed, right?).
Comment #27
sun.
Comment #28
plachI ain't sure this feature request still makes sense, I postponed this issue after the language negotiation revamp to see if this was still needed or useful. If we want to go on this way, I'd simply change the radios in a multiple checkbox selection listing all the available (configurable?) language types.
Comment #29
plachComment #30
Gábor HojtsyI think it could make sense to for example select languages only used for administration, which should not show up in language selectors. Probably not a 80% use case :)
Comment #31
plachAre you thinking about introducing an admin language type? It might be tricky, I'd just go with smart language detection methods (see the second example in http://drupal.org/update/modules/6/7#language_negotiation), after all we are setting UI language here not else.
Comment #32
Gábor HojtsyWell, both of your suggestions at #322995: Provide a distinct administration user interface language option has side effects on the front end behavior of the site to support setting up a consistent admin language and even then required admin interaction, so I'm thinking that a separate list could be useful. I'm not sure the admin (usability) complexity is worth it.
Comment #33
plachI agree that they are not ideal, I just meant that we can already achieve something similar with what we have in D7 core. IMO the best approach would be to have an admin language detection method that checks if the current page is an admin page and return a configured value or FALSE otherwise.
Comment #34
plachUnless perhaps we want to make admin language type non configurable, so it won't appear in the configuration page. But I think that page needs some usability improvement anyway.
Comment #35
plachNot working on this currently :)
Comment #36
plachMore lively discussion at #1314250: Allow filtering/configuration of which languages apply to what (UI, nodes, files, etc).
Comment #37
Gábor HojtsyTagging for base language system.