#34853: [Date Input Localization] Accept-Language Header Takes Precedence Over Language Set With Cookie -------------------------------------+------------------------------------- Reporter: blue-hexagon | Owner: nobody Type: Bug | Status: new Component: | Version: 4.1 Internationalization | Severity: Normal | Resolution: Keywords: l10n localization | Triage Stage: form input | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Natalia Bidart): I have ran and tested the provided Django project. I have reproduced the behavior as described, and after reading the docs, I think this may be a valid issue. Though we would need confirmation from Claude in order to pursue a fix, see below. It's worth noting that there is no issue when the language cookie is not set. What makes me doubt is that [https://docs.djangoproject.com/en/4.2/topics/i18n/translation/#how- django-discovers-translations the *translation* docs are very clear] that the cookie should take precedence over the `Accept-Language`, for translations, **BUT** [https://docs.djangoproject.com/en/4.2/topics/i18n/formatting/#overview the format localization docs] say: >Django’s formatting system is capable of displaying dates, times and numbers in templates using the format specified for the current locale. It also handles localized input in forms. >When it’s enabled, two users accessing the same content may see dates, times and numbers formatted in different ways, depending on the formats for their current locale. But these docs do not mention what is considered `their current locale`. Is it the cookie? Is it the `Accept-Language` header? As a user, my personal expectation is to have the language cookie honoured across a page, including the form date fields. And more so, it feels -- Ticket URL: <https://code.djangoproject.com/ticket/34853#comment:9> 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/0107018add3c1dea-dad73018-0abd-4b5a-a804-a32289313cf2-000000%40eu-central-1.amazonses.com.