Thursday, February 27, 2014

Re: Django i18n url is not working with en-us sublanguage

Hi, I just have the same error
could you solved it!!
thanks

On Monday, May 7, 2012 4:57:52 AM UTC-5, Suteepat Damrongyingsupab wrote:

My django app's using i18n_patterns in urls.py and when I go to my app with the url like:

myapp.com/en/

myapp.com/de/

myapp.com/en-gb/

The urls above works fine but the url myapp.com/en-us/ gave me an 404 error.

I think the problem is that (https://code.djangoproject.com/browser/django/trunk/django/conf/global_settings.py) Django's default LANGUAGE_CODE is 'en-us' but there is no 'en-us' in the default LANGUAGES setting. That's why I got 404 page.

Should I just change the LANGUAGE_CODE to 'en' or add 'en-us' to the LANGUAGES setting?

Is the default 'en-us' LANGUAGE_CDE setting useless when using with i18n URL?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d0ce9023-f9dd-4e55-890b-42c7490fc904%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment