def find_language(locale):
 if (not locale):
  return None
 LANGS = settings.AMO_LANGUAGES
 if (locale in LANGS):
  return locale
 loc = settings.SHORTER_LANGUAGES.get(locale)
 if loc:
  return loc
 locale = to_language(locale)
 if (locale in LANGS):
  return locale
 return None

def find_language ( locale ) : if ( not locale ) : return None LANGS = settings . AMO_LANGUAGES if ( locale in LANGS ) : return locale loc = settings . SHORTER_LANGUAGES . get ( locale ) if loc : return loc locale = to_language ( locale ) if ( locale in LANGS ) : return locale return None
return a locale we support .