mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
Generate en_US.UTF-8 during install
This commit is contained in:
parent
22ed77c23b
commit
7a7211fae9
1 changed files with 6 additions and 0 deletions
|
@ -432,6 +432,12 @@ function restart_services() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fix_locales() {
|
function fix_locales() {
|
||||||
|
# This function tries to fix the whole locale and perl mess about missing locale files
|
||||||
|
|
||||||
|
# Generate at least en_US.UTF-8
|
||||||
|
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
|
||||||
|
|
||||||
|
# If no /etc/environment exists, default to en_US.UTF-8
|
||||||
[ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment
|
[ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment
|
||||||
source /etc/environment
|
source /etc/environment
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
Loading…
Add table
Reference in a new issue