﻿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
34515	Translatable URL patterns raise 404 for non-English default language when prefix_default_language=False is used.	ab	Sarah Boyce	"A simple django project with instruction to replicate the bug can be found here:
[https://github.com/aboutofpluto/django-prefix-default-language-bug-report github repo]

In brief: `prefix_default_language = False`  raises HTTP 404 for the default unprefixed pages if `LANGUAGE_CODE` is not ""en"".

I think the problem is that the function `get_language_from_path` in `django/utils/translation/trans_real.py` returns `None` in case of failure instead of `LANGUAGE_CODE`: [https://github.com/django/django/commit/94e7f471c4edef845a4fe5e3160132997b4cca81#diff-cc1f617ac65a58aec8f73b7a909c5bb48e0391543fe64c4f7ee22d4333a529efL585 diff in 4.2]

Consequently, other mechanisms are used to get the language (cookies or headers) that do not work neither.

Related issue with my last comment adding some extra context: [https://code.djangoproject.com/ticket/34455]

It is the first time I contribute to django, I hope the bug report is OK. I am also willing to write the patch and test if required."	Bug	closed	Internationalization	4.2	Release blocker	fixed	internationalization, i18n, prefix_default_language, i18n_patterns	Sarah Boyce Claude Paroz sergioisidoro	Accepted	1	0	0	0	0	0
