The session language detection method is responsible of several open bugs in the language system queue:
#815526: Session language switcher prevents pages from being cached
#815544: Remove the language query string when using session language switch links
#768240: Session language switcher links do not report the active status correctly
Moreover it has been defined a really bad idea from one major D7 contributor.
As the current language system maintainer and being the one who actually coded it, I think it can safely be moved in contrib as the main reason it was introduced was allowing to set interface language and content language separately. This functionality has already been moved in contrib so there should be no harm in moving the session language detection method in contrib too. This would give us also the time to refine it and make it more solid.
A positive side effect would be that we would have only the original language detection methods available in the language detection and selection page, thus reducing the gap from the D6 UI.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 817114-11.patch | 1.47 KB | alexpott |
| #1 | language-817114-before.png | 18.64 KB | plach |
| #1 | language-817114-after.png | 17.22 KB | plach |
Comments
Comment #1
plachAttached you can find how the UI would change.
Comment #2
plachI spent three hours trying to fix #815544: Remove the language query string when using session language switch links last night but I could not come out with a working solution yet.
In the meantime I realized that the main problem with the session language provider is it was designed to work with the URL language provider (to be able to convey two language types within the same URL) and not as an alternative to it. With content language negotiation out of core the session language has no real meaning, and using it as an alternative to URL language negotiation can potentially cause duplicates both in Drupal's page cache and in the search engines' indexes (which is bad!).
Given this situation I'd strongly advocate removing session language negotiation from core to have time to rework it more carefully.
By the way, another related bug:
#784832: Conflict with the session language provider while creating a translation
Comment #3
damien tournoud commentedI support remove of this one, as already stated elsewhere. It breaks the principle of one URL == always the same content, which leads to a bunch of subtile and no-so-subtile bugs.
Comment #4
gábor hojtsyAgreed. In D6 we had some big efforts to tie URLs to the exact same content without out of URL swicthes to use different languages. Let's not break that tradition :)
Comment #5
andypostI support this partially. Principle if same content on same URL is useless for content editor! I need native language UI (switchable) while editing any multilingual content
Comment #6
plach@Damien Tournoud, @Gábor Hojtsy:
Well, the main idea behind the redesign of the language negotiation system was to achieve two separate behaviors (we used wikipedia as an inspiration):
@andypost:
Totally agreed. But if we can't fix the session language provider in core, IMO it's better to remove it and fix it in contrib.
By the way, while testing user language as an alternative to session language for content editors, I found this: #855380: $language_url should be used to lookup the current path alias :(
Comment #7
sunI've looked through all mentioned, related issues and actually have to say that I like the fixes for the bugs that seem to have been revealed by the session language handling. Hence, if this turns out to be excellent regression testing (like our beloved Poll module), then I'd rather keep it.
At the very least, we can fix those other issues first. If it keeps on being doomed afterwards, we can continue to discuss.
Comment #8
plachWe can't do this anymore.
Comment #9
alexpottWe now can deprecate things and then remove them in future versions. This seems like a good candidate for that.
Comment #10
alexpottComment #11
alexpottLet's deprecate the plugin and see what breaks.