Language setting

This commit is contained in:
Bob Mottram 2016-10-09 22:42:59 +01:00
parent ac542ebe9e
commit c0479cffde
2 changed files with 18 additions and 16 deletions

View File

@ -1280,6 +1280,7 @@ function interactive_select_language {
esac
save_configuration_values
locale-gen "${DEFAULT_LANGUAGE}"
update-locale LANG=${DEFAULT_LANGUAGE}
update-locale LANGUAGE=${DEFAULT_LANGUAGE}
update-locale LC_MESSAGES=${DEFAULT_LANGUAGE}

View File

@ -29,26 +29,27 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
function locale_setup {
if grep -Fxq "locale_setup" $COMPLETION_FILE; then
return
fi
if grep -Fxq "locale_setup" $COMPLETION_FILE; then
return
fi
apt-get -y install locales locales-all debconf
apt-get -y install locales locales-all debconf
if [ ! "$DEFAULT_LANGUAGE" ]; then
DEFAULT_LANGUAGE='en_GB.UTF-8'
fi
if [ ${#DEFAULT_LANGUAGE} -lt 2 ]; then
DEFAULT_LANGUAGE='en_GB.UTF-8'
fi
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}
locale-gen "${DEFAULT_LANGUAGE}"
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
echo 'locale_setup' >> $COMPLETION_FILE
}
# NOTE: deliberately no exit 0