Exemple #1
0
 def get_language_info(self, language):
     # ``language`` is either a language code string or a sequence
     # with the language code as its first item
     if len(language[0]) > 1:
         return translation.get_language_info(language[0])
     else:
         return translation.get_language_info(str(language))
Exemple #2
0
def language_bidi(lang_code):
    return translation.get_language_info(lang_code)['bidi']
Exemple #3
0
 def render(self, context):
     lang_code = self.lang_code.resolve(context)
     context[self.variable] = translation.get_language_info(lang_code)
     return ''
Exemple #4
0
def language_name_local(lang_code):
    return translation.get_language_info(lang_code)['name_local']