What is the recommended way to retrieve directionality client-side? It doesn't look like mw.language has anything.
Topic on Talk:Directionality support
If the wiki has the ULS extension installed, you can do $.uls.data.getDir( 'xy' )
(where xy is the language code).
@Amire80: Ah, good to know, thanks! I wonder if something like this should be added to core.
From what I know at the moment, it looks like the way to get it without ULS is to inspect the DOM and find the dir
attribute of a .mw-content-ltr
or .mw-content-ltr
element (which is a bit weird, considering that if one was trying to make that a simpler query they'd have to already know the direction!).