Locale Prefix
Hi, how would you go about creating localized routes for filament?
I need routes like:
-
/en/admin/...
for english admin panel,
- /de/admin/...
for german admin panel
and so on
Is there any way to override the routes.php
file of filament? Or preferably just extend it?7 Replies
Thanks, I did that too. But the thing is, for the default locale (such as
en
) I need it to work without the prefix, so /admin
will be english but /de/admin
will be german.I didn't check but make it nullable
'{local?}/admin'
Nah that doesn't work either. Then it probably just thinks that the
locale
is admin
.
We use https://github.com/codezero-be/laravel-localized-routes
on the front-facing part of the app and are trying to make it compatible with the filament panels and I'm having a hard time doing so. π
The package itself does a lot of magic to make it work it seemsGitHub
GitHub - codezero-be/laravel-localized-routes: βοΈ A convenient way ...
βοΈ A convenient way to set up and use localized routes in a Laravel app. - codezero-be/laravel-localized-routes
No idea now, sorry
np, thanks anyways π
@Lukas Frey I have the same need for my panels, I'd like to have the locale in my url but it's a real pain...
So you didn't have any issues with this package ? https://github.com/codezero-be/laravel-localized-routes
GitHub
GitHub - codezero-be/laravel-localized-routes: βοΈ A convenient way ...
βοΈ A convenient way to set up and use localized routes in a Laravel app. - codezero-be/laravel-localized-routes