#34515: Translatable URL patterns raise 404 for non-English default language when prefix_default_language=False is used. -------------------------------------+------------------------------------- Reporter: ab | Owner: Sarah | Boyce Type: Bug | Status: assigned Component: | Version: 4.2 Internationalization | Severity: Release blocker | Resolution: Keywords: | Triage Stage: Accepted internationalization, i18n, | prefix_default_language, | i18n_patterns | Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by ab):
* keywords: internationalization, i18n, prefix_default_language => internationalization, i18n, prefix_default_language, i18n_patterns Comment: @Sarah: yes, it is the same problem. After investigating the code, the change in behavior is linked to the fact that `get_language_from_path` returns `None` when the url is not prefixed. So, the cookie is used (or the `Accept-Language` header sent by the browser). @David: thanks for your contribution, but I do not fully agree. If `prefix_default_url` is `True`, the language is correctly detected by django based on the URL. If I set `prefix_default_url` to `False` I expect the same behavior for the default language without prefix. When I decide do use `i18n_patterns` at least (I have just added this tag to the ticket). When `i18n_patterns`is not used, I agree with you. So the problem might come from i18n_patterns not calling/handling correctly the calls to the new `get_language_*` functions. -- Ticket URL: <https://code.djangoproject.com/ticket/34515#comment:11> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070187bc7c28f1-f42c1368-9287-41e7-a30c-a16f5b3c3dc6-000000%40eu-central-1.amazonses.com.