How to translate slug
Multi tenant context, multi lang
How to translate resource slug? (->getSlug())
Slug is called before middleware.
Exists a way to achieve it?
In this case my locale is ja_JP
2 Replies
You need a file under resources/lang/ja_JP. You specify with return __(path)
For more info
https://laravel.com/docs/11.x/localization
is called before middleware I cant change locale.
The solution is session.
In login set session(['locale', ''])
and in a boot method of provider use
App::setLocale(session()->get('locale'))
the code has to be improved.
I only check that in login filament doesn't register router, it can be work
I found the solution to have all slug route translated
In Resource
but at the moment I still haven't figured out how to translate panel path, panel loginRouteSlug, ...
it's too hard translate the whole uri.
i keep it in english