def get_interface_language():
 try:
  locale_language = locale.getdefaultlocale()[0]
 except ValueError:
  locale_language = DEFAULT_LANGUAGE
 language = DEFAULT_LANGUAGE
 if (locale_language is not None):
  spyder_languages = get_available_translations()
  for lang in spyder_languages:
   if (locale_language == lang):
    language = locale_language
    break
   elif (locale_language.startswith(lang) or lang.startswith(locale_language)):
    language = lang
    break
 return language

def get_interface_language ( ) : try : locale_language = locale . getdefaultlocale ( ) [ 0 ] except ValueError : locale_language = DEFAULT_LANGUAGE language = DEFAULT_LANGUAGE if ( locale_language is not None ) : spyder_languages = get_available_translations ( ) for lang in spyder_languages : if ( locale_language == lang ) : language = locale_language break elif ( locale_language . startswith ( lang ) or lang . startswith ( locale_language ) ) : language = lang break return language
if spyder has a translation available for the locale language .