From translatewiki.net
Jump to navigation Jump to search


Test Template Info-Icon - Version (2).svg
The documentation of this template is included from its /doc subpage. [Edit]
Return the main writing direction of a specified language.
  • {{Dir | 1 = language-code | 2 = RTL value | 3 = LTR value }}
  • {{Dir | lang = language-code | rtl = RTL value | ltr = LTR value }}
  • lang= or 1=: standard language code from BCP 47 (the letter case of the code is not significant), e.g. "en" for English, "ar" for Arabic, "he" for Hebrew.
  • rtl= or 2=: value to return if the language is written right-to-left,such as Arabic or Hebrew (optional, "rtl" by default)
  • ltr= or 3=: value to return if the language is written left-to-right, such as English or Chinese (optional, "ltr" by default)
  • "{{Dir}}" generates: "ltr"
  • "{{Dir|en}}" generates: "ltr"
  • "{{Dir|ar}}" generates: "rtl"
  • "{{Dir|en|right-to-left|left-to-right}}" generates: "left-to-right"
  • "{{Dir|ar|right-to-left|left-to-right}}" generates: "right-to-left"
See also: