Translations
Variables are translated directly in the backoffice. For each variable, the developer can choose if the variable should be translated or keep the same value with all languages.
For text elements that are not variables ( labels for a form, title of a button of reservation, etc ...) we use locales.
<button class="btn btn-primary">__@@Send@@__</button>
__@@Send@@__
will be translated according the page language.
Locales are static texts in the html. Since the system is multi-language, you should not put hard coded text in your code. Instead, use a locale tag. Once put into production, the system will require local translation in the back office and replace it with the right translation.
BAD (hard coded text)
GOOD (locale for translation)
<button class="btn">Book now</button>
<button class="btn">__@@Book now@@__</button>
You can add a local with the pattern __@@NAME@@__
Locales are shared by all sites with the same theme and can be overrided on each website.
If a locale is not translated, the key / name will be rendered. For instance, if __@@Book now@@__
is not translated into Spanish, we will write “Book now
” .
As locales are defined by their key, if you replace the key of your locale in the code, if will create a new locale in the BO and you won't have the already translated value.
Last updated