Jump to content

Template:Rtl

From translatewiki.net

right

The documentation of this template is included from its /doc subpage.
Usage:
Return the main writing direction of a specified language.
Syntax:
  • {{Rtl | rtl = RTL value | ltr = LTR value }}
  • {{Rtl | lang = language-code | rtl = RTL value | ltr = LTR value }}
Parameters:
  • lang=: 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 (the UI language code by default).
  • rtl=: value to return if the language is written right-to-left,such as Arabic or Hebrew (optional, "left" by default)
  • ltr=: value to return if the language is written left-to-right, such as English or Chinese (optional, "right" by default)
Example:
  • "{{Rtl}}" generates: "right"
  • "{{Rtl|lang=en}}" generates: "right"
  • "{{Rtl|lang=ar}}" generates: "left"
  • "{{Rtl|lang=en|rtl=right-to-left|ltr=left-to-right}}" generates: "left-to-right"
  • "{{Rtl|lang=ar|lrtl=right-to-left|ltr=left-to-right}}" generates: "right-to-left"
See also: