Ticket #14170: get_language_from_request.diff

File get_language_from_request.diff, 728 bytes (added by German M. Bravo, 14 years ago)
  • django/utils/translation/trans_real.py

     
    369369        if normalized in _accepted:
    370370            # We've seen this locale before and have an MO file for it, so no
    371371            # need to check again.
    372             return _accepted[normalized]
     372            lang = _accepted[normalized]
     373            if lang.lower() not in supported:
     374                continue
    373375
    374376        for lang, dirname in ((accept_lang, normalized),
    375377                (accept_lang.split('-')[0], normalized.split('_')[0])):
Back to Top