parameters: ()
docstring: Reloads languages
docstring_summary: Reloads languages
docstring_tokens: Reloads languages
function: def reload():
      """
      Reloads languages
      """
      global NAMES
      NAMES = {}
  
      for lang in pycountry.languages:
          is_iso6391 = getattr(lang, "alpha_2", None)
          if is_iso6391 or lang.alpha_3 in settings.NON_ISO6391_LANGUAGES:
              NAMES[lang.alpha_3] = NAME_OVERRIDES.get(lang.alpha_3, lang.name)
  
      # sort by name
      NAMES = OrderedDict(sorted(NAMES.items(), key=lambda n: n[1]))
function_tokens: def reload ( ) : global NAMES NAMES = { } for lang in pycountry . languages : is_iso6391 = getattr ( lang , "alpha_2" , None ) if is_iso6391 or lang . alpha_3 in settings . NON_ISO6391_LANGUAGES : NAMES [ lang . alpha_3 ] = NAME_OVERRIDES . get ( lang . alpha_3 , lang . name ) # sort by name NAMES = OrderedDict ( sorted ( NAMES . items ( ) , key = lambda n : n [ 1 ] ) )