Talk:Directionality support

About this board

Accessing dir in JavaScript

3
Samwilson (talkcontribs)

What is the recommended way to retrieve directionality client-side? It doesn't look like mw.language has anything.

Amire80 (talkcontribs)

If the wiki has the ULS extension installed, you can do $.uls.data.getDir( 'xy' ) (where xy is the language code).

Samwilson (talkcontribs)

@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!).

Reply to "Accessing dir in JavaScript"
Krinkle (talkcontribs)

I'm not entirely sure but this reads like a manual, perhaps move it to the manual namespace ? I'll leave it up to those more involved with this area to decide that. Just suggesting :)

Samwilson (talkcontribs)

@Krinkle: Sounds like a good idea to me.

Reply to "Manual"
Krinkle (talkcontribs)

Is directionality determined by language or script? I've never actually heard anyone talk from R to L. Is there a step further on (like: "en is written in the Latin alphabet, and thus is written LTR"? As an illustration: the language en:Serbo-Croatian is written in Cyrillic script and in Arabic script (and more scripts, but here is the point). -DePiep 23:20, 2 August 2011 (UTC)

This post was posted by Krinkle, but signed as DePiep.

Krinkle (talkcontribs)

Let me illustrate my point.

  • An audio file in Hebrew is not RTL. I discussed this yesterday by telephone with a friend, in Arabic, and he too was not talking with a specific directionality.
  • The current example File:LTR content with RTL interface (after).png does have a mirrored interface (mirrored from the en.wikipedia), but that "interface" is not scriptwise RTL by itself. It is perfectly imaginable (if not possible) to have that mirrored layout, and use English LTR content everywhere.
  • (By the way, should the word "interface" not be "style", as opposed to "content"? CSS and all.)
  • Is there a decisive list available that says: "language Aa(a) is written in script Xxxx"? The list could be decisive for all wikiworld. This way thousands of languages would fold into some hundreds of scripts.
  • My suggestion is: when talking directionality, don't talk languages, but talk scripts. Only scholars & researchers are allowed to mix up those -- in a controlled environment. Outside it is dangerously confusing! -DePiep 10:23, 3 August 2011 (UTC)

This post was posted by Krinkle, but signed as DePiep.

Krinkle (talkcontribs)

Directionality is indeed determined by script, but currently in MediaWiki there is no clear distinction between language and script. For example, there is a "kk-latn", "kk-cyrl" and "kk-arab" language file (just like there are "fr", "de" and "ca" language files), which is all in Kazakh but in different scripts. So the language used on the page can refer to either term. That's why I refer to language rather than script. And how could one talk from right to left? The image is indeed a mirrored interface, but in MediaWiki that means it is displayed as RTL, which becomes clear when you browse other pages in an RTL interface. The word interface looks fine to me. There is no such list yet, but I am planning for quite some time to make one (there is a a list, but it's not precise nor decisive). SPQRobin 23:17, 5 August 2011 (UTC)

This post was posted by Krinkle, but signed as SPQRobin.

Reply to "Language or script?"
There are no older topics
Return to "Directionality support" page.