Skip to content
Snippets Groups Projects
Commit c0479cff authored by Bob Mottram's avatar Bob Mottram
Browse files

Language setting

parent ac542ebe
No related branches found
No related tags found
No related merge requests found
......@@ -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}
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment