diff options
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/translation/trans_real.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 9f930b54ef..edecfeca61 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -30,9 +30,9 @@ CONTEXT_SEPARATOR = u"\x04" # Format of Accept-Language header values. From RFC 2616, section 14.4 and 3.9. accept_language_re = re.compile(r''' - ([A-Za-z]{1,8}(?:-[A-Za-z]{1,8})*|\*) # "en", "en-au", "x-y-z", "*" - (?:;q=(0(?:\.\d{,3})?|1(?:.0{,3})?))? # Optional "q=1.00", "q=0.8" - (?:\s*,\s*|$) # Multiple accepts per header. + ([A-Za-z]{1,8}(?:-[A-Za-z]{1,8})*|\*) # "en", "en-au", "x-y-z", "*" + (?:\s*;\s*q=(0(?:\.\d{,3})?|1(?:.0{,3})?))? # Optional "q=1.00", "q=0.8" + (?:\s*,\s*|$) # Multiple accepts per header. ''', re.VERBOSE) language_code_prefix_re = re.compile(r'^/([\w-]+)/') |
