def getID(lang=None):
 if lang:
  val = lang
 else:
  try:
   val = prefs.app['locale']
  except KeyError:
   val = locale.GetLocale()
  if (not val):
   val = codeFromWxId[wx.LANGUAGE_DEFAULT]
 try:
  language = wxIdFromCode[val]
 except KeyError:
  logging.error(('locale %s not known to wx.Locale, using default' % val))
  language = wx.LANGUAGE_DEFAULT
 return (language, val)

def getID ( lang = None ) : if lang : val = lang else : try : val = prefs . app [ 'locale' ] except KeyError : val = locale . GetLocale ( ) if ( not val ) : val = codeFromWxId [ wx . LANGUAGE_DEFAULT ] try : language = wxIdFromCode [ val ] except KeyError : logging . error ( ( 'locale %s not known to wx.Locale, using default' % val ) ) language = wx . LANGUAGE_DEFAULT return ( language , val )
get wx id of language to use for translations: lang .