@register.simple_tag
def language_name(code):
 return escape(force_text(Language.objects.get(code=code)))

@ register . simple_tag def language_name ( code ) : return escape ( force_text ( Language . objects . get ( code = code ) ) )
gets language name based on its code .