summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/translation/trans_real.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index 7a2a1c63a2..ad4d521590 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -48,7 +48,7 @@ language_code_re = re.compile(
re.IGNORECASE
)
-language_code_prefix_re = re.compile(r'^/([\w@-]+)(/|$)')
+language_code_prefix_re = re.compile(r'^/(\w+([@-]\w+)?)(/|$)')
@receiver(setting_changed)