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/langlanguages 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 namedmessagesinsideMySection>MyContainercan 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.phpUsage#
Nothing much to show here, here's how you use translated strings:
__('mySection@myContainer::messages.welcome');Further reading
More info at Localization.