Hello,
Is there a way for the API to tell me the English name of a language?
For example, using the code "fr", I'd like it to get "French" (not "Français").
This API call gives me a list of all the languages, with their local names, but I would like their English names: http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=...
<lang code="en" xml:space="preserve">English</lang> <lang code="fr" xml:space="preserve">Français</lang> <lang code="es" xml:space="preserve">Español</lang> <lang code="ja" xml:space="preserve">日本語</lang> <lang code="ru" xml:space="preserve">Русский</lang>
This page lists all the Wikipedias, with the English name for the language in the second column, but I don't know whether that info is accessible by API: http://meta.wikimedia.org/wiki/List_of_Wikipedias#1_000_000.2B_articles
1 English English en 3 French Français fr 7 Spanish Español es 6 Japanese 日本語 ja 10 Russian Русский ru
Thank you, and happy birthday Wikipedia!
Kai Carver (Kaicarver) Paris, France
On Sat, Jan 15, 2011 at 4:45 PM, Kai Carver kai.carver@gmail.com wrote:
Hello,
Is there a way for the API to tell me the English name of a language?
I looked around, but as far as I can find MediaWiki only has the names in their native language available.
2011/1/17 Bryan Tong Minh bryan.tongminh@gmail.com:
I looked around, but as far as I can find MediaWiki only has the names in their native language available.
That's right, the English names aren't stored by MediaWiki. I guess if we did that we'd have to have every language's name in every other language, which would be a huge amount of data (371 languages, so we'd need 371*371=137,641 translations).
Roan Kattouw (Catrope)
On 01/17/2011 12:52 PM, Roan Kattouw wrote:
2011/1/17 Bryan Tong Minh bryan.tongminh@gmail.com:
I looked around, but as far as I can find MediaWiki only has the names in their native language available.
That's right, the English names aren't stored by MediaWiki. I guess if we did that we'd have to have every language's name in every other language, which would be a huge amount of data (371 languages, so we'd need 371*371=137,641 translations).
Its not much different from adding an extension with 371 msg keys, we have like ~3K msg keys just core no? You could look at as adding 10% more messages.
I would support having localised listing of languages. it would make language selection widgets a lot easier to follow. This list could be seeded from a digital source relativity easily. What to translate wiki folks think?
--michael
Hi,
On Tue, Jan 18, 2011 at 5:41 AM, Michael Dale mdale@wikimedia.org wrote:
Its not much different from adding an extension with 371 msg keys, we have like ~3K msg keys just core no? You could look at as adding 10% more messages.
I would support having localised listing of languages. it would make language selection widgets a lot easier to follow. This list could be seeded from a digital source relativity easily.
I sort-of tackled a similar problem a few weeks ago: http://www.gpaumier.org/blog/628_universal-language-picker/ </shameless plug>
It's not a solution to the problem raised here, but it's a system that would benefit from / be based on the same solution.
Op 18-01-11 05:41 schreef Michael Dale mdale@wikimedia.org:
On 01/17/2011 12:52 PM, Roan Kattouw wrote:
2011/1/17 Bryan Tong Minh bryan.tongminh@gmail.com:
I looked around, but as far as I can find MediaWiki only has the names in their native language available.
That's right, the English names aren't stored by MediaWiki. I guess if we did that we'd have to have every language's name in every other language, which would be a huge amount of data (371 languages, so we'd need 371*371=137,641 translations).
Its not much different from adding an extension with 371 msg keys, we have like ~3K msg keys just core no? You could look at as adding 10% more messages.
I would support having localised listing of languages. it would make language selection widgets a lot easier to follow. This list could be seeded from a digital source relativity easily. What to translate wiki folks think?
The translatewiki.net folks think they love the Unicode CLDR project[1] and fully support further use of the CLDR extension. Also see bug 16699[2] which was created over two years ago.
We would love to be a front for the CLDR project, but we've never had the right contacts and time to enter a dialog with them[3]. We are against creating and supporting an extension that would duplicate the CLDR efforts.
Cheers!
Siebrand
[1] http://cldr.unicode.org/ [2] https://bugzilla.wikimedia.org/show_bug.cgi?id=16699 [3] https://translatewiki.net/wiki/Todo
mediawiki-api@lists.wikimedia.org