Default language

This commit is contained in:
Bob Mottram 2015-12-02 20:25:48 +00:00
parent 6f15c0a703
commit 0b3d103da8
1 changed files with 14 additions and 5 deletions

View File

@ -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
}