def do_get_language_info(parser, token):
 args = token.contents.split()
 if ((len(args) != 5) or (args[1] != 'for') or (args[3] != 'as')):
  raise TemplateSyntaxError(("'%s' requires 'for string as variable' (got %r)" % (args[0], args[1:])))
 return GetLanguageInfoNode(args[2], args[4])

def do_get_language_info ( parser , token ) : args = token . contents . split ( ) if ( ( len ( args ) != 5 ) or ( args [ 1 ] != 'for' ) or ( args [ 3 ] != 'as' ) ) : raise TemplateSyntaxError ( ( "'%s' requires 'for string as variable' (got %r)" % ( args [ 0 ] , args [ 1 : ] ) ) ) return GetLanguageInfoNode ( args [ 2 ] , args [ 4 ] )
this will store the language information dictionary for the given language code in a context variable .