Sets the default system locale for this system. You can see which locales are available by running locale -a
.
On Debian based systems, this recipe sets the locale by running update-locale
and on Fedora, it uses localectl
.
On RHEL based systems, the recipe operates on the /etc/sysconfig/i18n file directly because there is no standard command line tool to change the system locale settings.
This locale resource is now shipped built-in with Chef 14.5 or later. This cookbook will continue to function with older chef-client releases, but all updates will now be performed directly in the chef-client codebase.
- Debian / Ubuntu derivatives
- openSUSE / SUSE Linux Enterprises
- RHEL/CentOS/Scientific/Amazon/Oracle
- Fedora
- Chef 12.7+
- Include the cookbook in your metadata.
locale 'set locale' do
lang 'en_gb.utf-8'
lc_all 'en_gb.utf-8'
end
name | type | default value |
---|---|---|
lang | String | en_US.utf8 |
lc_all | String | en_US.utf8 |
This cookbook is maintained by Chef's Community Cookbook Engineering team. Our goal is to improve cookbook quality and to aid the community in contributing to cookbooks. To learn more about our team, process, and design goals see our team documentation. To learn more about contributing to cookbooks like this see our contributing documentation, or if you have general questions about this cookbook come chat with us in #cookbok-engineering on the Chef Community Slack
Copyright: 2016-2018, Chef Software, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.