-
Hi! When I choose a locale and go to another page, the locale is reseted to its default value: Screencast.from.08-10-2024.15.12.47.webmBut I want the last locale I chose to persist. Are there any suggestions on how to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
hi. then in the resource you can set: public static function getDefaultTranslatableLocale(): string
{
return session('activeLocal');
} I am just thinking out loud :) not sure if it will fully works, but this a starting point. |
Beta Was this translation helpful? Give feedback.
hi.
so since the
activeLocal
is on the class level (create/edit/list), the only way I can think of is to override the actionLocaleSwitcher
and set the view to custom view. then use alpine Persist Plugin. or store it on a session somehow!
then in the resource you can set:
I am just thinking out loud :) not sure if it will fully works, but this a starting point.