#15168: feature request - New setting
------------------------------------------------+---------------------------
               Reporter:  zay2                  |         Owner:  nobody
                 Status:  closed                |     Milestone:  1.3   
              Component:  Internationalization  |       Version:  SVN   
             Resolution:  wontfix               |      Keywords:        
           Triage Stage:  Unreviewed            |     Has patch:  0     
    Needs documentation:  0                     |   Needs tests:  0     
Patch needs improvement:  0                     |  
------------------------------------------------+---------------------------

Comment (by bpeschier):

 Replying to [comment:6 zay2]:

 > Now im not saying - "i want to ignore this 1 language when it is not set
 in a cookie"(quoting bpeschier). Im saying that i want the page be in
 language used by target audience. I cant do this with this accept headers
 based language discovery[[BR]]
 >
 > "In your case I would extend the LocaleMiddleware to mirror that; check
 the HTTP_ACCEPT_LANGUAGE in META before handing it to the
 LocaleMiddleware-superclass and rewrite English to Estonian "(quoting
 bpeschier) - There already is default language setting - it just does not
 work in all cases. [[BR]]
 >

 The default language is defined as the language to fall back to when no
 suitable language can be found and since you have an English translation,
 there is a suitable one according to definitions. Making settings which
 breaks this behaviour is not in the interest of Django or developers using
 it (just another setting in an already long list).

 Instead of introducing a setting which is hardly used, a solution could be
 to refactor {{{ get_language_from_request }}} into two distinct parts;
 this means you only have to override a very small function in
 !LocaleMiddleware, which would not call the detection based on headers. It
 would not be hard to create a patch for this.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15168#comment:7>
Django <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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to