def check_for_language(lang_code):
 for path in all_locale_paths():
  if (gettext_module.find('django', path, [to_locale(lang_code)]) is not None):
   return True
 return False

def check_for_language ( lang_code ) : for path in all_locale_paths ( ) : if ( gettext_module . find ( 'django' , path , [ to_locale ( lang_code ) ] ) is not None ) : return True return False
checks whether there is a global language file for the given language code .