#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-------------------------------------+-------------------------------------
     Reporter:  wayneye              |                    Owner:  Zainab
                                     |  Amir
         Type:  Bug                  |                   Status:  assigned
    Component:                       |                  Version:  1.7
  Internationalization               |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Zainab Amir):

 Created a fix for it on my branch:
 https://github.com/django/django/compare/main...zainab-amir:ticket_23689
 I will create a PR on django if no one has any suggestions or comments.

 1. The documentation already mentions that the header should be case
 sensitive, so I fixed that
 2. Also noticed that running django server with these settings throw an
 error as mentioned below. This is also fixed.

 {{{
 LANGUAGES = (
     ('EN-US', 'English (US)'),
     ('De', 'Deutsche'),
     ('ar', 'عربى'),
 )

 LANGUAGE_CODE = 'en-us'
 }}}

 ERROR:
 {{{
 ERRORS:
 ?: (translation.E004) You have provided a value for the LANGUAGE_CODE
 setting that is not in the LANGUAGES setting.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23689#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018168d6de54-3e4f3682-0e5c-4771-b9c1-db92b1ff295d-000000%40eu-central-1.amazonses.com.

Reply via email to