---json { "canonical": ":semantic:lang", "name": "Language", "page_id": "7w8jba3xbxyjl8r6jaujx", "title": "How to set the language (RTL\/LTR) ?" } --- ====== How to set the Language (Lang) ? ====== ===== About ===== In ComboStrap, you can define a language: * for the application: [[:docs:app:lang]] (the default value for all pages) * for a page: [[:docs:page:lang]] * for a component: [[:docs:styling:lang]] ===== Value ===== The language is identified by a language identifier value known as the ''lang'' [[..:metadata:metadata|metadata]]. It is a 2 letters code that follows the [[https://www.loc.gov/standards/iso639-2/php/English_list.php|ISO 639-2 specification]] . Example: * ''en'' (English), * ''fr'' (French) * ''nl'' (Dutch) * ''ar'' (Arabic). (See [[#rtlright_to_left_language|Right-to-left language support]]) ===== Usage ===== The language identifier is used: * in the [[..:locale:locale|locale]] to localize the page for external [[:docs:social:social|social third party]] * by the rendering engine to set the language and layout direction. ===== Direction ===== Each language has an intrinsic value that is known as the direction. ^ Direction Value ^ Direction Name ^Description ^ Supported ^ | ''LTR'' | ''left to right'' | You read the text from left to right (Example: English) | Yes | | ''RTL'' | ''right to left'' | You read the text from right to left (Example: Arabic) | Yes with the default bootstrap theme | | ''TTB'' | ''top-to-bottom'' | You read the text from top to bottom (Example: Chinese) | No | ==== RTL ==== We have created a page in ''arabic'' that has a language direction from [[#rtlright_to_left_language|right-to-left (''rtl'')]] See the demo page: [[lang_ar]] As ''bootswatch'' does not support yet RTL languages, you need to set your [[docs:theme:bootstrap|Bootstrap version at minimal to 5 with the bootstrap theme]]. Example with the version ''5.01 - bootstrap'': {{:strap:bootstrapversionstylesheet.png|}}