#28636: Translation module: Check `LANG_INFO` against user's language 
preference as
optional feature
-------------------------------------+-------------------------------------
               Reporter:  denisiko   |          Owner:  nobody
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Utilities  |        Version:  1.11
               Severity:  Normal     |       Keywords:  translation,
           Triage Stage:             |  locale, request
  Unreviewed                         |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 **Problem**: In the current state, the user's discovered language
 preference is only returned when found in `settings.LANGUAGES`. That's
 more than sufficient for the normal translation routine, but there seems
 to be no way (at least no DRY way) to find out a user's locale preference
 REGARDLESS of `settings.LANGUAGES`.

 **Suggestion**: It would be nice to have an easy way for finding out a
 languange preference from request, even if it's not listed in your
 supported languages. You could think of an optional flag, so that the
 preference from `get_language_from_request` is checked against `LANG_INFO`
 in the translation module rather than only against `settings.LANGUAGES`.
 This would give you a locale from all languages that are available in the
 translation module. You could use that e.g. for comparing with
 `settings.LANGUAGE_CODE` and add a fallback for specific cases.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28636>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.6a66b06fc4d7b0705ef824e2e61cbb52%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to