Last modified: 2011-07-11 13:53:05 UTC
Is it possible to (at least), have the english language variant of the various languages on the API page for sitematrix? Though, i suspect doing the local version of it is probably AS easy, if not easy eg on the en.wp <language code="de" name="Deutsch" localname="German"> <site> <site url="http://de.wikipedia.org" code="wiki" /> <site url="http://de.wiktionary.org" code="wiktionary" /> <site url="http://de.wikibooks.org" code="wikibooks" /> <site url="http://de.wikinews.org" code="wikinews" /> <site url="http://de.wikiquote.org" code="wikiquote" /> <site url="http://de.wikisource.org" code="wikisource" /> <site url="http://de.wikiversity.org" code="wikiversity" /> </site> It was being requested in #wikimedia-tech, so hence posting this request
Moving to the SiteMatrix component; this is not a core API module, but an extension.
Note that localized names of other languages are not currently available in our localization files... the cldr extension provides them but I'm not sure if in a way that's easily accessible atm.
LanguageNames::getNames() return an array of language names in a given language (the code of the language you are requesting names in is the first parameter. For example LanguageNames::getNames( 'en' ); would return array( 'German', 'French', 'English', ... ); and LanguageNames::getName( 'fr' ) would return array( 'Anglais', 'Français', ... );
Committed in r52298: * (bug 18878) Include UI-lang names of foreign languages in SiteMatrix if CLDR LanguageNames extension is present. In a 'title' tooltip for table UI, in 'localname' attributes for raw and API output modes. If the LanguageNames extension has not been loaded, then the info simply won't be included. Note that this update being visible on live sites will require both the software update to SiteMatrix and enabling of LanguageNames.
I wonder if this should be reworked due to Nikerabbit fixing (bug 9465) in r91875