-
Notifications
You must be signed in to change notification settings - Fork 0
Managing Translations
Handling translations efficiently is crucial for multilingual websites. In this templating system, translations are accessible using the $translate(KEY_TRANSLATION) syntax, allowing content to be dynamically translated based on the available language settings.
Translations can be created in two ways:
- From a Content Item – By clicking on the "Translations" option within the content editor.
- From a Node – By clicking the "Translation" button on a specific node.
Each translation consists of:
-
Language Code (e.g.,
en,fr,es) - Translation Key (unique identifier for the text)
- Translation Value (translated text)
A translation is accessible within a content item if:
- It is defined directly in that content item.
- It exists in one of its parent nodes.
If multiple translations share the same key, the one defined in the content takes priority over those in parent nodes.
<h1>$translate(WELCOME_MESSAGE)</h1>
<p>$translate(DESCRIPTION)</p>Languages are managed in the Languages section within the menu. When creating a node or content item, you must:
- Choose a default language (required)
- Select optional secondary languages (if needed)
This ensures proper translation fallback and prioritization.
This system allows for flexible and hierarchical translation management, ensuring that each piece of content is displayed in the appropriate language while maintaining structured control over translations.
#TranslationManagement #MultilingualSupport #Localization #WebsiteTranslation #TemplatingSystem
#ContentManagement #LanguageSupport #DynamicTranslations #WebDevelopment #Internationalization