Last modified: 2014-10-30 19:06:10 UTC
https://en.m.wikipedia.org/w/api.php?action=query&format=json&meta=siteinfo&siprop=general%7Clanguages&prop=langlinks&llurl=true&lllimit=max&titles=Tofu This returns a list of language codes languages: [ {code:aa, *:Qafár af} ...{lang:he, url:https://he.wikipedia.org/wiki/%D7%98%D7%95%D7%A4%D7%95, *:טופו} ] In mobile we need to identify which languages are RTL and which are not. Expected: Return a rtl property when a language is RTL languages: [ {code:aa, *:Qafár af } ... {lang:he, url:https://he.wikipedia.org/wiki/%D7%98%D7%95%D7%A4%D7%95, *:טופו, rtl: true }]
At a glance, it seems this would require fetching a Language object for every single language. That may be prohibitive from a performance perspective.
Pulling in some i18n experts.
Even if we can skip that part (as with Language::getFallbacksFor()), it would still require loading language info for every language which has the same concerns.
I said on IRC that many people use jquery.uls.data for getting the direction of a language. I do not know if that is possible for you.
I don't understand the bug summary. https://he.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general lang="he" rtl="" WORKSFORME
He is asking for rtl="" for all supported languages, not for the content language (where the flag exists). https://he.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=languages For what the dir is needed in this context? Another solutation maybe where to add the dir (rtl or ltr) to each language link from the prop=langlinks, than there is no need to fetch all languages and just use the one which are needed. By the way: For performance you can actually change meta=siteinfo&siprop=languages by llprop=autonym