Translations / Multi languages
Get the current language
{{current_lang.local}} <!-- for example: fr, en -->
{{current_lang.iso}} <!-- for example: fr_FR, en_US -->
<!--
These ones can be overrided by the user
in the backoffice for each website
-->
{{current_lang.name_full}} <!-- for example Français, English -->
{{current_lang.name_short}} <!-- for example fr, en -->
You can do use these variables in if/else
statement, even if you should as most possible try to avoid to hardcode this kind of logic. Different behavior should be editable in the backoffice.
Locales
LocalesTranslating variables
VariablesLink variables
When link variables are non translatable => if you choose internal link or galaxy link, the system will automatically generate the link in the correct language
RTL Languages
When building a theme, it can be used with several languages, including right-to-left languages (like Arabic, or Hebrew for example).
<html dir="rtl" lang="ar" data-template="home">
Just as you can use {{current_lang.local}}
, you also have {{current_lang.reading_direction_id}}
.
{{current_lang.reading_direction_id}} <-- Will return ltr or rtl -->
Additional notes
Styling based on languageLast updated