@register.tag('get_current_language')
def do_get_current_language(parser, token):
 args = token.contents.split()
 if ((len(args) != 3) or (args[1] != 'as')):
  raise TemplateSyntaxError(("'get_current_language' requires 'as variable' (got %r)" % args))
 return GetCurrentLanguageNode(args[2])

@ register . tag ( 'get_current_language' ) def do_get_current_language ( parser , token ) : args = token . contents . split ( ) if ( ( len ( args ) != 3 ) or ( args [ 1 ] != 'as' ) ) : raise TemplateSyntaxError ( ( "'get_current_language' requires 'as variable' (got %r)" % args ) ) return GetCurrentLanguageNode ( args [ 2 ] )
this will store the current language in the context .