Skip to main content
Version: 10.x

Languages

Definition

Languages are not real Components, they are just files that holds translations.

Rules

  • Languages CAN be placed inside the Containers. However, the default laravel resources/lang languages files are still loaded and can be used as well.

  • All Translations are namespaced as the camelCase of its Section name + @ + camelCase of its Container name.
    For example, translation key inside a translation file named messages inside MySection > MyContainer can be accessed like this: __(mySection@myContainer::messages.welcome)

Folder Structure

- app
- Containers
- {section-name}
- {container-name}
- Resources
- Languages
- en
- messages.php
- users.php
- ar
- messages.php
- users.php

Usage

Nothing much to show here, here's how you use translated strings:

__('mySection@myContainer::messages.welcome');
Further reading

More info at Localization.