Ticket #14170: get_language_from_request.diff
File get_language_from_request.diff, 728 bytes (added by , 14 years ago) |
---|
-
django/utils/translation/trans_real.py
369 369 if normalized in _accepted: 370 370 # We've seen this locale before and have an MO file for it, so no 371 371 # need to check again. 372 return _accepted[normalized] 372 lang = _accepted[normalized] 373 if lang.lower() not in supported: 374 continue 373 375 374 376 for lang, dirname in ((accept_lang, normalized), 375 377 (accept_lang.split('-')[0], normalized.split('_')[0])):