Skip to content

Commit

Permalink
Fix locale
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Oct 5, 2023
1 parent 1581c09 commit 1352585
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions blog/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.php]
ij_php_space_before_short_closure_left_parenthesis = false
ij_php_space_after_type_cast = true

[*.md]
trim_trailing_whitespace = false

Expand Down
7 changes: 6 additions & 1 deletion blog/config/web/events.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
declare(strict_types=1);

use App\Timer;
use Yiisoft\Translator\TranslatorInterface;
use Yiisoft\Yii\Http\Event\ApplicationStartup;
use Yiisoft\Yii\Middleware\Event\SetLocaleEvent;

return [
ApplicationStartup::class => [
static fn (Timer $timer) => $timer->start('overall'),
static fn(Timer $timer) => $timer->start('overall'),
],
SetLocaleEvent::class => [
static fn(TranslatorInterface $translator, SetLocaleEvent $event) => $translator->setLocale($event->getLocale()),
]
];

0 comments on commit 1352585

Please sign in to comment.