Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I realize that work on the 7.x version is very early. I just wanted to mention this in case it's -supposed to be working- at this point. The Language switcher (User interface text) block does not appear after being assigned to a region. Languages are configured (though the Selection/Detection page doesn't seem to have anything that would apply to the switching block).
Comment | File | Size | Author |
---|---|---|---|
#13 | i18n_language_switcher-1023208-13.patch | 1.2 KB | plach |
#12 | i18n_language_switcher-1023208-12.patch | 1.58 KB | plach |
Comments
Comment #1
feneur CreditAttribution: feneur commentedI had the same issue before I enabled selection on the /admin/config/regional/language/configure (Administration » Configuration » Regional and language » Languages, and then the Detection and Selection tab) page, I think it was the "User" detection method, but I enabled them all so I'm not 100% sure.
Comment #2
feneur CreditAttribution: feneur commentedComment #3
plachThe language swicther appears only if one enables a language detection method that actually alters links, hence allowing to switch language (in core only URL and Session). User method instead does not provide a way to switch language since it's a fixed value.
You may want to enable User method on top of the URL one to be able to switch language if a user has not specified a language preference or has not logged in.
Does this solve your issues?
Comment #4
j. ayen green CreditAttribution: j. ayen green commentedYes, that did it. Thanks!
Comment #5
detran CreditAttribution: detran commentedIt took me a day before I found your post and set it to work properly!! Your post is quite helpful!
Comment #6
plachComment #7
plachAs we can see here, D7 language switcher has a big UX problem, which was already present in D6: one can enable the language switcher block without performing the needed language negotiation settings. In this case the language switcher won't appear.
Since this cannot be fixed in core, I think we could introduce a massage warning the user that she needs to configure language negotiation to have the language switcher actually displayed.
Comment #8
yoroy CreditAttribution: yoroy commentedSubscribe. Use the magic 'usability' tag to get this on the ux team radar :)
Comment #9
plachRelated issue: #729146: Language switcher block (User interface text language detection) doesn't appear.
Comment #10
plachAnoher one: #1066044: Language switcher block does not show up. We must fix this.
Comment #11
plachAgain: #1078880: D7, block Language switcher (User interface text) doesn't appear.
Comment #12
plachHere is a patch.
Comment #13
plachThe previous patch was flawed: the warning message was showed even when changing the block region. The current one only shows it when enabling the block.
Comment #14
Jose Reyero CreditAttribution: Jose Reyero commentedOk, committed into i18n.
However I think this should be an issue for Drupal core, but anyway, in the meanwhile, we'll save some headaches.
Comment #15
plach#1082902: Improve language switcher usability
Thanks :)
Comment #18
giupenni CreditAttribution: giupenni commentedThe problem persists.
7.x-1.11 version.
Comment #19
giupenni CreditAttribution: giupenni commented