Skip to content

Managing Translations

MammothDevelopper edited this page Sep 19, 2025 · 2 revisions

Managing Translations in a Templating System

Introduction

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.

Creating Translations

Translations can be created in two ways:

  1. From a Content Item – By clicking on the "Translations" option within the content editor.
  2. 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)

Accessing Translations

A translation is accessible within a content item if:

  1. It is defined directly in that content item.
  2. 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.

Example Usage:

<h1>$translate(WELCOME_MESSAGE)</h1>
<p>$translate(DESCRIPTION)</p>

Managing Languages

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.

Conclusion

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

Clone this wiki locally