﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17720	LocaleMiddleware inspects language from URL path in a backwards incompatible way	Anssi Kääriäinen	Jannis Leidel	"As reported by Ryan Kaskel in [http://groups.google.com/group/django-developers/browse_thread/thread/6ba8b5311b419a17 this] django-dev thread, the LocaleMiddleware inspects the user's language from the URL path in a backwards incompatible way.

Kaskel had /sl/ as a prefix for his URL path, and due to that Slovak was activated as the language to use. He did not use the new i18n_patterns method in his patterns.

The relevant commit is this: r16405

There is this warning added to the docs:
{{{
    Ensure that you don't have non-prefixed URL patterns that might collide 
    with an automatically-added language prefix. 
}}}
An user doesn't have much chance to dodge this issue: suggesting change of his existing URLs doesn't really fly.

I think the only sane fix is to detect if the user is using i18n_patterns in his root urls.py. If he isn't, no language introspection should be done based on the URL path. I have attached a patch with tests for this. My reading of the docs suggests no changes are needed there.

I do think this is backwards incompatible and should be fixed in one way or another before 1.4. Marking this as Release Blocker due to this not really being my ticket, but a confirmation of Kaskel's findings.
"	Bug	closed	Internationalization	1.4-beta-1	Release blocker	fixed		Anssi Kääriäinen	Accepted	0	0	0	0	0	0
