diff --git a/django/templatetags/i18n.py b/django/templatetags/i18n.py index edb297404a..c7202e252b 100644 --- a/django/templatetags/i18n.py +++ b/django/templatetags/i18n.py @@ -399,7 +399,7 @@ def language(parser, token): """ bits = token.split_contents() - if len(bits) < 2: + if len(bits) != 2: raise TemplateSyntaxError("'%s' takes one argument (language)" % bits[0]) language = parser.compile_filter(bits[1]) nodelist = parser.parse(('endlanguage',))