#7720: LocaleMiddleware doesn't fallback to the first part of the language code.
----------------------------------+-----------------------------------------
 Reporter:  djoume                |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  Internationalization  |     Version:  SVN       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  1                     |  
----------------------------------+-----------------------------------------
 Hi,

 I have a project where the language cookie is set by another system (under
 the same domain).

 This system set the LANGUAGE_COOKIE to 'fr-ca' or 'en-us'.

 I have in my settings file:

 {{{
 #!python
 LANGUAGES = (
     ('en', ugettext('English')),
     ('fr', ugettext('French')),
 )
 }}}

 According to the documentation, this should restrict languages that are
 available for automatic selection to French and English (and any
 sublanguage, like fr-ca or en-us).

 This is true when the language is set in the HTTP Header (ie fr-ca matches
 fr) but not when the language is set in the LANGUAGE_COOKIE by another
 system.

 The attached patch is a tentative to fix this (it works for me).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7720>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to