Languages
#
DefinitionLanguages are not real Components, they are just files that holds translations.
#
RulesLanguages 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 namedmessages
insideMySection
>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
#
UsageNothing much to show here, here's how you use translated strings:
__('mySection@myContainer::messages.welcome');
Further reading
More info at Localization.