Download & Extend

Allow different language types to be enabled separately

Project:Drupal core
Version:8.x-dev
Component:language system
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)
Issue tags:D8MI, i18n sprint, language-base, translatable fields

Issue Summary

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.

Comments

#1

Status:active» needs review
AttachmentSizeStatusTest resultOperations
ui_content_language-533924-1.patch17.67 KBIdleFailed: 11870 passes, 7 fails, 0 exceptionsView details | Re-test

#2

Status:needs review» needs work

The last submitted patch failed testing.

#3

#4

Status:needs work» needs review

fixed a simpletest

AttachmentSizeStatusTest resultOperations
ui_content_language-533924-4.patch18.34 KBIdleFailed: Failed to apply patch.View details | Re-test

#5

slightly reworked patch

AttachmentSizeStatusTest resultOperations
ui_content_language-533924-5.patch18.81 KBIdleFailed: Failed to apply patch.View details | Re-test

#6

looking 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

#7

@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 :).

AttachmentSizeStatusTest resultOperations
ui_content_language-533924-7.patch21.34 KBIdleFailed: Failed to apply patch.View details | Re-test

#8

Status:needs review» needs work

The last submitted patch failed testing.

#9

Status:needs work» needs review

rerolled

AttachmentSizeStatusTest resultOperations
ui_content_language-533924-9.patch21.44 KBIdleFailed: Failed to apply patch.View details | Re-test

#10

Status:needs review» needs work

The last submitted patch failed testing.

#11

Status:needs work» needs review

I forgot to fix my own tests :(

AttachmentSizeStatusTest resultOperations
ui_content_language-533924-11.patch21.45 KBIdleFailed: Failed to apply patch.View details | Re-test

#12

- testbot seems to be happy...
- I like where this patch is going
- the admin interface is not optimal (but sufficient)

#13

Status:needs review» needs work

The last submitted patch failed testing.

#14

Status:needs work» needs review

#15

Status:needs review» needs work

The last submitted patch failed testing.

#16

Issue tags:+i18n sprint

Tagging.

#17

Status:needs work» needs review

Straight reroll.

AttachmentSizeStatusTest resultOperations
ui_content_language-533924-17.patch22.87 KBIdleFailed: 12349 passes, 20 fails, 0 exceptionsView details | Re-test

#18

Status:needs review» needs work

The last submitted patch failed testing.

#19

Status:needs work» needs review

my own tests...
(sigh)

AttachmentSizeStatusTest resultOperations
ui_content_language-533924-19.patch23.36 KBIdleFailed: Failed to apply patch.View details | Re-test

#20

Status:needs review» needs work

The last submitted patch failed testing.

#21

Status:needs work» needs review

head broke -- resetting status

#22

A couple of screenshots to help people understanding what's going on here.

AttachmentSizeStatusTest resultOperations
ui_content_language-533924-19-config.png23.87 KBIgnored: Check issue status.NoneNone
ui_content_language-533924-19-overview.png26.41 KBIgnored: Check issue status.NoneNone

#23

Status:needs review» needs work

The last submitted patch failed testing.

#24

Version:7.x-dev» 8.x-dev
Status:needs work» postponed

#25

Title:Distinguish between UI language and content language» Allow different language types to be enabled separately

#26

Status:postponed» needs work

How 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?).

#27

Issue tags:+D8MI

.

#28

Issue tags:-D8MI

How do you imagine other language types would work with this?

I 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.

#29

Issue tags:+D8MI

#30

I 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 :)

#31

Are 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.

#32

Well, 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.

#33

I 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.

#34

Unless 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.

#35

Assigned to:plach» Anonymous

Not working on this currently :)

#36

Status:needs work» closed (duplicate)

More lively discussion at #1314250: Refactor "enabled" bit on languages to be a set of bits.

#37

Issue tags:+language-base

Tagging for base language system.

nobody click here