Language switching
m-aciek opened this issue · 6 comments
The question may seem funny, but: Is there a way to switch to another language on the site?
https://people.djangoproject.com/es/ links to Django people from Spain, https://es.people.djangoproject.com/ doesn't work. I am afraid translations aren't implemented, can anyone confirm it?
The function that Django uses internally to get the language from a request (get_language_from_request) checks the path, the session, the cookies, and the language headers. I was hoping there would be a GET fallback, but there does not appear to be.
Because the site's urls.py hijacks the normal /es/-style language specification, as you mentioned, I don't see how you could change your language as a user, short of clearing your cookies and then having your browser send a different language header. I couldn't find anything in the urls to suggest they've reimplemented this some other way, though it's entirely possible I missed something.
This is a bit confusing, considering there are translations in the code for 17 non-English languages with no easy way to change between them.
Whether this helps really depends on your system language, I think; as I understand it, this should enable those extra languages for users whose browser sends the appropriate headers, but it still won't be possible to manually switch languages (since the normal url patterns for that are overridden by the project).
Am I mistaken, or am I misunderstanding your problem?
I was wrongly concerned that site is working only in English, without any option to change the language. That's because I thought my native language was properly added to site, but it wasn't.
So my original motivation to express the need of adding language switching will be gone soon.
OK. So your concern isn't actually switching languages, it's that your native language had a translation but hadn't been added to the settings?
Yes, it is.
We can keep the issue opened nonetheless. Suggested solution would be letting the user choose a language from a list of available languages in account's settings.