This PR adds new Translating component. This component allows building multi-language websites more easily. You simply define translation files like this:
// translations/en.php
return [
'title' => 'Welcome to the Lemon Framework'
];
// translations/cs.php
return [
'title' => 'Vitejte v citronove ramopraci'
];
Locale can be changed via \Lemon\Translator::locate().
And texts can be accessed via \Lemon\Translator::text() or { text } juice directive.
It also adds \Lemon\Translating\Middlewares\TranslationLocalizer which can be used to automatically set locale from sesion.
This PR adds new
Translating
component. This component allows building multi-language websites more easily. You simply define translation files like this:Locale can be changed via
\Lemon\Translator::locate()
.And texts can be accessed via
\Lemon\Translator::text()
or{ text }
juice directive.It also adds
\Lemon\Translating\Middlewares\TranslationLocalizer
which can be used to automatically set locale from sesion.