Add Internationalization
- Add Utils/L10n class - Add translator functions to PHP Renderer - Refactor web controllers to prevent duplicated code - Add locale middleware - Add translation file loading - Add i18n settings
This commit is contained in:
parent
13a2068a8b
commit
5b7bb030de
21 changed files with 537 additions and 245 deletions
|
|
@ -18,6 +18,11 @@ if (\is_readable(__DIR__ . '/../config/local.json')) {
|
|||
$settings = [
|
||||
'displayErrorDetails' => false, // set to false in production
|
||||
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
|
||||
'i18n' => [
|
||||
'locales' => ['en', 'fr'],
|
||||
'default' => 'en',
|
||||
'path' => __DIR__ . '/lang'
|
||||
],
|
||||
// Escaper settings
|
||||
'escaper' => [
|
||||
'encoding' => 'utf-8'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue