def _localectl_set(locale=''):
 locale_params = (_parse_dbus_locale() if HAS_DBUS else _parse_localectl())
 locale_params['LANG'] = str(locale)
 args = ' '.join(['{0}="{1}"'.format(k, v) for (k, v) in six.iteritems(locale_params)])
 cmd = 'localectl set-locale {0}'.format(args)
 return (__salt__['cmd.retcode'](cmd, python_shell=False) == 0)

def _localectl_set ( locale = '' ) : locale_params = ( _parse_dbus_locale ( ) if HAS_DBUS else _parse_localectl ( ) ) locale_params [ 'LANG' ] = str ( locale ) args = ' ' . join ( [ '{0}="{1}"' . format ( k , v ) for ( k , v ) in six . iteritems ( locale_params ) ] ) cmd = 'localectl set-locale {0}' . format ( args ) return ( __salt__ [ 'cmd.retcode' ] ( cmd , python_shell = False ) == 0 )
use systemds localectl command to set the lang locale parameter .