Page MenuHomePhabricator

Provide a new magic word {{USERLANGUAGE}}/{{USERLANG}}
Closed, DuplicatePublic

Description

Author: Wiki.Melancholie

Description:
We have {{CONTENTLANGUAGE}} & {{CONTENTLANG}} that gives the standard lang of a wiki, but what if a user has a different language (like on Commons)? {{CONTENTLANGUAGE}} often isn't useful then at all. Therefore many communities intricately use the {{int:.../lang}} functionality as a workaround instead (where possible; e.g. see [[commons:MediaWiki:Lang]]; even for internationalization of text content).

Please provide {{USERLANGUAGE}} & {{USERLANG}} for a usage like {{Template:Foo/{{USERLANG}}}} and many other things (e.g. for parser function stuff).


Version: unspecified
Severity: enhancement
URL: http://commons.wikimedia.org/wiki/MediaWiki:Lang?uselang=eo

Details

Reference
bz16608

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz16608.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Dec 10 2008, 4:56 AM

fran wrote:

Impossible due to caching. Page content cannot depend on a specific user's settings.

Wiki.Melancholie wrote:

Another argument is that there is a JavaScript variable (var wgUserLanguage = "...";) being the very same topic (not cached as well), but only working for JavaScript, unfortunately.

herd wrote:

(In reply to comment #1)

Impossible due to caching. Page content cannot depend on a specific user's
settings.

The main problem with this one, is it breaks referential integrity, like link tables.

Consider:

{{#switch:{{USERLANG}}|en=[[Foo]]|fr=[[Feu]]|de=[[Fü]]}}

The link that will actually be registered (like for Special:Whatlinkshere) will depend on the language setting of the last user to edit or purge the page.

Setting to depend on bug 14404 since that is where this problem will be resolved, but it is more of a "this bug depends on that bug being WONTFIXed or the tone reversed". I guess.

Wiki.Melancholie wrote:

Like comment #2 shows, this is already possible today (to break referential integrity, without having this magic word).

This magic word would not change anything in concern of referential integrity issues, it would just be easier to use (as available on every wiki by default, you do not have to set up 250+ langs).

It is ok to wait until bug 14404 is fixed (if this is going to be somewhen), but if bug 14404 isn't to be fixed there actually is no reason for not creating this magic word then, as it doesn't make the referential integrity break issue worse in quality (neither in quantity (with the time the (even worse) solution of comment #2 would have to and will be enforced)).

Wiki.Melancholie wrote:

you do not have to set up 250+ langs

... on every wiki.

  • This bug has been marked as a duplicate of bug 2085 ***
kaldari reopened this task as Open.Feb 10 2016, 11:25 PM
kaldari added a subscriber: kaldari.

Should be marked as duplicate instead...

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 10 2016, 11:25 PM