salt.modules.localemod
Module for managing locales on POSIX-like systems.
-
Check if a locale is available.
New in version 2014.7.0.
CLI Example:
salt '*' locale.avail 'en_US.UTF-8'
salt.modules.localemod.avail(locale)
-
Generate a locale. Options:
New in version 2014.7.0.
- Parameters
-
locale -- Any locale listed in /usr/share/i18n/locales or /usr/share/i18n/SUPPORTED for Debian and Gentoo based distributions, which require the charmap to be specified as part of the locale when generating it.
- verbose
-
Show extra warnings about errors that are normally ignored.
CLI Example:
salt '*' locale.gen_locale en_US.UTF-8 salt '*' locale.gen_locale 'en_IE.UTF-8 UTF-8' # Debian/Gentoo only
salt.modules.localemod.gen_locale(locale, **kwargs)
-
Get the current system locale
CLI Example:
salt '*' locale.get_locale
salt.modules.localemod.get_locale()
-
Lists available (compiled) locales
CLI Example:
salt '*' locale.list_avail
salt.modules.localemod.list_avail()
-
Sets the current system locale
CLI Example:
salt '*' locale.set_locale 'en_US.UTF-8'
salt.modules.localemod.set_locale(locale)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.localemod.html