@library.global_function
def get_language_choices():
 for (code, name) in settings.LANGUAGES:
  lang_info = translation.get_language_info(code)
  name_in_current_lang = translation.ugettext(name)
  local_name = lang_info[u'name_local']
  (yield (code, name_in_current_lang, local_name))

@ library . global_function def get_language_choices ( ) : for ( code , name ) in settings . LANGUAGES : lang_info = translation . get_language_info ( code ) name_in_current_lang = translation . ugettext ( name ) local_name = lang_info [ u'name_local' ] ( yield ( code , name_in_current_lang , local_name ) )
get language choices as code and text in two languages .