Hi Nathalia,
Thanks for the lively discussion ![]()
You are spot on with this question. The short answer, IMHO, is that you can view the page in the default language navigating to
/a-proposissuing a request without any lang preference.
I am sorry I cannot agree with such a statement. Who (except geeks like us) knows how to remove a cookie or change the Accept-Language header of their browser? Most people just except to see a page in french when they click on a âFRâ link
. And thatâs the choice of the website editor whether some routes (â/â for instance) are to be translated automatically or not (@sarahboyce, your idea of adding an option might be helpful here).
As @carltongibson said, what you propose do not let you reach the default language.
Regarding wikipedia, all right, it redirects you when you copy/paste the link, that happens to me too. But, then, I can click on âspanishâ and I can have access to the spanish page. As @carltongibson also said (thanks pal
), it works because www subdomain redirects you based on your browser but once youâre on the en subdomain or es subdomain, it ignores your 'Accept-Language' header. That is why https://es.wikipedia.org/wiki/Association_football is a 404, it does not redirect to https://en.wikipedia.org/wiki/Association_football.
So the www subdomain works almost as 5, except that it redirects you to another subdomain, and thatâs a difference
. But then, the âlanguage-prefixed-subdomainsâ do not use URL redirection at all. And if you want to change, youâre free to do so.
Once again, I am sorry to insist, when you activate i18n_patterns with default_prefix_language = False, I think 3 is the correct behavior. Because if you want use a cookie or header to detect the language, you just donât use i18n_patterns but LocaleMiddleware alone. In that case I agree that Django should do its best to redirect the visitor.
In the end, I agree with that comment.
TTYL for sure!