Eolica-Web / nova-locale-switcher

A simple locale switcher for Nova without any concrete localization implementation
MIT License
13 stars 11 forks source link

Support nova 4 #7

Closed anditsung closed 6 months ago

anditsung commented 2 years ago

support laravel nova 4 (4.60)

Screen Shot 2022-05-21 at 12 06 44

====

have issue when user change the locale from the user resource will not update the current locale on component

====

protected $middlewareGroups = [
        'web' => [
            \Eolica\NovaLocaleSwitcher\Http\Middleware\LocaleSwitcher::class,
        ],
    ];

add this middleware instead of using nova serving to change locale. if using nova serving some language is not translated ( update & continue editing )

Screen_Shot_2022-05-21_at_11 48 26
NoahNxT commented 2 years ago

Looking forward to see this merged!

NoahNxT commented 2 years ago

But don't forget to update the documentation and add the part that you'll have to add the column "locale" to your user model migration.

NoahNxT commented 2 years ago

@anditsung

NoahNxT commented 1 year ago

@anditsung any updates on this? I've tested this through and it looks perfectly working.