Module for managing locales on POSIX-like systems.
salt.modules.localemod.avail(locale)¶Check if a locale is available.
2014.7.0 新版功能.
CLI 范例:
salt '*' locale.avail 'en_US.UTF-8'
salt.modules.localemod.gen_locale(locale, **kwargs)¶Generate a locale. Options:
2014.7.0 新版功能.
| 参数: | 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. |
|---|
CLI 范例:
salt '*' locale.gen_locale en_US.UTF-8
salt '*' locale.gen_locale 'en_IE.UTF-8 UTF-8' # Debian/Gentoo only
salt.modules.localemod.get_locale()¶Get the current system locale
CLI 范例:
salt '*' locale.get_locale
salt.modules.localemod.list_avail()¶Lists available (compiled) locales
CLI 范例:
salt '*' locale.list_avail
salt.modules.localemod.set_locale(locale)¶Sets the current system locale
CLI 范例:
salt '*' locale.set_locale 'en_US.UTF-8'