Last modified: 2008-12-10 10:14:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 16608 - Provide a new magic word {{USERLANGUAGE}}/{{USERLANG}}
Provide a new magic word {{USERLANGUAGE}}/{{USERLANG}}
Status: RESOLVED DUPLICATE of bug 2085
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://commons.wikimedia.org/wiki/Med...
:
Depends on: 14404
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-10 04:56 UTC by Melancholie
Modified: 2008-12-10 10:14 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Melancholie 2008-12-10 04:56:17 UTC
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).
Comment 1 Fran Rogers 2008-12-10 04:59:00 UTC
Impossible due to caching. Page content cannot depend on a specific user's settings.
Comment 3 Melancholie 2008-12-10 05:12:39 UTC
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.
Comment 4 Splarka 2008-12-10 06:48:38 UTC
(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=[[]]}}

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.
Comment 5 Melancholie 2008-12-10 09:45:14 UTC
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)).
Comment 6 Melancholie 2008-12-10 09:46:41 UTC
> you do not have to set up 250+ langs
... on every wiki.
Comment 7 Mormegil 2008-12-10 10:14:08 UTC

*** This bug has been marked as a duplicate of bug 2085 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links