-
Notifications
You must be signed in to change notification settings - Fork 308
Description
My language changes between en-gb and es work fine except for the special case where es/ is in the path.
E.g.
domain.com/humanresources/employee and then switch to Spanish. Works fine. Then switch back to English.
Code somewhere goes looking for es/ and removes it whereever found thus:
domain.com/humanresoureemployee and a 404 is the result.
I've battled with numerous urls.py approaches (i18n_patterns etc) and it always happens.
When I remove Jazzmin my Admin can change language via the clever Chrome>Settings>Languages>Preferred Languages then 3dots menu and Move to Top. So I change languages without clicking any buttons.
With the urls.py below I see no en-gb/ nor es/ in the path. Which is prettier. Previous urls.py approaches (which I'd struggle to replicate) had the en-gb/ or es/ in the path. Before turning on Jazzmin "language_chooser": True, I used to manually change the path to jump between languages and the problem existed then too.
urlpatterns = [
path("i18n/", set_language, name='set_language'),
path('', admin.site.urls)
]
I imagine this would happen with e.g. en/ for English and an app called token (tokEN/somemodel). Maybe no one happens to have the correct combination of paths. And to think I thought about calling the app humanresource - which would have bypassed the problem.
It would be great if someone could replicate it or rule it out as Jazzmin.
Thanks