-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's the best way to deal with more complex locales like 'ch-fr'? #69
Comments
Hello, That's an interesting idea. Now, I've been thinking about this for a short while and found a few complications... A slug in the URL needs to be connected to a locale for route names and translations (a sort of internal locale). I still need to work this out further, but I will certainly include your suggestion in the final result. |
I have a requirement to include the locale AND the country in the URL like this:
/ch-fr/entreprises
/de-en/companies
/at-de/unternehmen
I am also going to have multiple countries with the same locale:
/ch-de/unternehmen
/de-de/unternehmen
/at-de/unternehmen
This basically works by setting the
supported-locales
config value to something like this:However, I think this has some disadvantages, for example, now I have to have 3 versions for German in the
lang
directory and keep them in sync:ch-de
,de-de
andat-de
. Having only onede
directory no longer works. Other third party packages like spatie/laravel-translatable do not work well with this approach.In order to avoid duplication, I would have proposed a syntax like this:
But I guess this would break the domains/subdomains feature. So I'm wondering what's the best approach to deal with this?
Any suggestions are highly appreciated!
The text was updated successfully, but these errors were encountered: