def locale_info():
 grains = {}
 grains['locale_info'] = {}
 if salt.utils.is_proxy():
  return grains
 try:
  (grains['locale_info']['defaultlanguage'], grains['locale_info']['defaultencoding']) = locale.getdefaultlocale()
 except Exception:
  grains['locale_info']['defaultlanguage'] = 'unknown'
  grains['locale_info']['defaultencoding'] = 'unknown'
 grains['locale_info']['detectedencoding'] = __salt_system_encoding__
 return grains

def locale_info ( ) : grains = { } grains [ 'locale_info' ] = { } if salt . utils . is_proxy ( ) : return grains try : ( grains [ 'locale_info' ] [ 'defaultlanguage' ] , grains [ 'locale_info' ] [ 'defaultencoding' ] ) = locale . getdefaultlocale ( ) except Exception : grains [ 'locale_info' ] [ 'defaultlanguage' ] = 'unknown' grains [ 'locale_info' ] [ 'defaultencoding' ] = 'unknown' grains [ 'locale_info' ] [ 'detectedencoding' ] = __salt_system_encoding__ return grains
provides defaultlanguage defaultencoding .