Template:LangDirSwitch

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:LangDirSwitch/doc.


Use this template to check whether the current user's language is a right-to-left or a left-to-right language. The following code shows how the template works: {{LangDirSwitch|rtl=text for right-to-left languages|ltr=text for left-to-right languages}}. The result is: text for left-to-right languages. to a right-to-left language, such as Arabic or Hebrew; the green text should now read "text for right-to-left languages".)

This template can also be applied when dealing with page elements with a fixed position. For instance, users reading in left-to-right languages see Top icons on the upper-right-hand side of their page, while users reading in right-to-left ones see them on the upper-left-hand side. (Try it: English; Hebrew.)