Last modified: 2014-11-17 10:34:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18699, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16699 - {{#language:...}} should support variable language **output** as well as input (CLDR)
{{#language:...}} should support variable language **output** as well as inpu...
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
unspecified
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n, patch-need-review
Depends on: 28176
Blocks: 15308
  Show dependency treegraph
 
Reported: 2008-12-18 17:26 UTC by Happy-melon
Modified: 2014-11-17 10:34 UTC (History)
11 users (show)

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


Attachments

Description Happy-melon 2008-12-18 17:26:06 UTC
It would be very useful for the {{#language:...}} parser function to take a second parameter, which is the language in which the name of the language *code* given in the first parameter should be displayed.  Eg:

{{#language:en|en}} == {{#language:en}} --> English
{{#language:en|fr}} --> Anglais
{{#language:fr|en}} --> French
{{#language:fr|fr}} == {{#language:fr}} --> Français

This is after discussion at en.wiki VPR ( http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=258801355#ISO_language_template ) where we considered the usefulness of such a template.  It essentially requires an array approximately 185x185 containing the name of every language in every other language; someone pointed out that this content is being created (slowly!) at http://unicode.org/cldr/survey_tool.html ; some is already available in our svn ( http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/cldr/ ).
Comment 1 Brion Vibber 2008-12-18 17:30:13 UTC
This has been experimentally worked on in the CLDR extension:

http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/cldr/

Probably pretty straightforward if we want to go ahead and adapt it; there doesn't seem to be a live dependency, the CLDR DB is used to generate lists which can be used in straight PHP.
Comment 2 Siebrand Mazeland 2008-12-23 13:03:17 UTC
Should the summary of this request be changed to a request to enable the CLDR extension on en.wp or all Wikimedia wikis?

One thing to consider: as the CLDR extension is a derivative work of the CLDR database, making custom additions, even though possible, is quite unwanted, as it fragments what should indeed be maintained centrally in CLDR. We have been using this extension for a long while already at Betawiki, and the issue has always been to get updates/corrections from our users into CLDR; this is a problem that is yet to be resolved[1]. I would call upon anyone with a drive to pick this up.

[1] http://translatewiki.net/wiki/Todo
Comment 3 Siebrand Mazeland 2009-02-08 11:06:08 UTC
Update domain to Wikimedia/Site requests, adding keyword 'review-needed', to request enabling this on Wikimedia wikis.
Comment 4 Ryan Kaldari 2011-04-18 23:56:13 UTC
This functionality is now written into the {{#languagename}} parser function that is part of the i18nTags extension (although dependent on the CLDR extension). See bug 9465.

If it's OK with Niklas, I'm hoping to move this parser function out of i18nTags and into CLDR instead.

Recommend marking this bug WONTFIX.
Comment 5 Siebrand Mazeland 2011-04-19 05:59:54 UTC
(In reply to comment #4)
> If it's OK with Niklas, I'm hoping to move this parser function out of i18nTags
> and into CLDR instead.

Yes, that's OK :).
Comment 6 Ryan Kaldari 2011-04-19 06:06:01 UTC
Well, turns out we may just drop {{#languagename}} entirely and port it to {{#language}} instead, which is probably the most sensible thing in the long run.
Comment 7 Niklas Laxström 2011-07-11 12:26:41 UTC
Fixed in r91875.
Comment 8 Zoloinwiki 2011-10-31 10:17:46 UTC
We could make good use of this in Commons [http://commons.wikimedia.org/wiki/Template:Language template:language] that is used in about 400,000 pages. However, for languages that are not in the CDLR, the current template can be more comprehensive than the parser. Eg language|sli|fr and language|ug-arab|fr return French translations while the parser returns "Lower Silesian" and "ئۇيغۇرچە" (more examples at [http://commons.wikimedia.org/wiki/User:Zolo/test3 User:Zolo/test3].  Since the parser returns original language or English instead of just the code, I imagine that it should be fixable. Would it be possible to export Commons data so that we can make use of the parser ?
Comment 9 Ryan Kaldari 2011-10-31 17:05:34 UTC
Yes, we can pass data back up to the CLDR database for inclusion and then it will eventually be available through {{#language}}. I would suggest emailing Amir Aharoni (aaharoni@wikimedia.org) and tell him what data you would like added to CLDR.

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


Navigation
Links