Default language
This commit is contained in:
parent
6f15c0a703
commit
0b3d103da8
|
@ -35,7 +35,7 @@ PROJECT_NAME='freedombone'
|
|||
export TEXTDOMAIN=$PROJECT_NAME
|
||||
export TEXTDOMAINDIR="/usr/share/locale"
|
||||
|
||||
DEFAULT_LANGUAGE='en_GB'
|
||||
DEFAULT_LANGUAGE=$(echo $LANG)
|
||||
|
||||
# username created by default within a debian image
|
||||
GENERIC_IMAGE_USERNAME='fbone'
|
||||
|
@ -530,10 +530,19 @@ function locale_setup {
|
|||
fi
|
||||
|
||||
apt-get -y install locales debconf
|
||||
update-locale LANGUAGE=${DEFAULT_LANGUAGE}.UTF-8
|
||||
update-locale LC_MESSAGES=${DEFAULT_LANGUAGE}.UTF-8
|
||||
update-locale LC_ALL=${DEFAULT_LANGUAGE}.UTF-8
|
||||
update-locale LC_CTYPE=${DEFAULT_LANGUAGE}.UTF-8
|
||||
|
||||
if [ ! "$DEFAULT_LANGUAGE" ]; then
|
||||
DEFAULT_LANGUAGE='en_GB.UTF-8'
|
||||
fi
|
||||
if [ ${#DEFAULT_LANGUAGE} -lt 2 ]; then
|
||||
DEFAULT_LANGUAGE='en_GB.UTF-8'
|
||||
fi
|
||||
|
||||
update-locale LANG=${DEFAULT_LANGUAGE}
|
||||
update-locale LANGUAGE=${DEFAULT_LANGUAGE}
|
||||
update-locale LC_MESSAGES=${DEFAULT_LANGUAGE}
|
||||
update-locale LC_ALL=${DEFAULT_LANGUAGE}
|
||||
update-locale LC_CTYPE=${DEFAULT_LANGUAGE}
|
||||
|
||||
echo 'locale_setup' >> $COMPLETION_FILE
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue