Appearance
Localisation
Each section has its own translations to help keep the main language files clear of any section specific translations. All translations are stored in the translations key, the main different with section translations is they allow for markdown or generic translations.
All translations must be registered in English and optionally you may add the default translations for other languages by using the ISO-2 standard
Translations can be named the same as global translation names, all translations are self-contained within the section you are working on, so you can have multiple of the same section on the same page all with the same translation name.
json
{
"translations": {
"en": {
"EXAMPLE": "Example content",
"MARKDOWN_EXAMPLE": {
"type": "markdown",
"value": "Example Content\n{.text-white}"
},
"ATTRIBUTE_EXAMPLE": "Hi :name"
}
}
}Translations can be accessed using the Section facade.
html
<h1>{{ Section::translate('EXAMPLE') }}</h1>INFO
It's preference as the developer if you want to use ALL CAPS for translations, the system will automatically convert these for you, but for readability you can do Section::translate('markdown_title') if you prefer.