#LANG_DIR

#LANG_DIR returns the writing direction for a text depending on its language, being either "ltr" (for "left to right"), or "rtl" (for "right to left"). As with the #LANG tag, the language is taken from the closest loop containing a "lang" field, otherwise from the environment, otherwise from the site’s main language. This tag is very useful for multi-lingual sites that mix languages having different writing directions (like English and Arabic, for instance).

Example

Display the text for a section in the direction that it should be in:

  1. <BOUCLE_display_content(RUBRIQUES){id_rubrique}>
  2. <div dir='#LANG_DIR'>#TEXTE</div>
  3. </BOUCLE_display_content>

Download

Author Mark Baber Published : Updated : 06/06/10

Translations : English, français