https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&meta=siteinfo&format=json&siprop=general%7Clanguages
In the response it should also reference whether the language is rtl or ltr.