Check if the locale is installed

This commit is contained in:
Anthony Rose 2021-02-15 15:52:10 +00:00
parent 51843de7b4
commit fd41fd2973

View file

@ -102,6 +102,10 @@ case "$LANG" in
PAPERSIZE="a4" PAPERSIZE="a4"
;; ;;
esac esac
if [ -x /usr/bin/locale ] && [ $(locale -a 2>/dev/null | grep ${LANG-invalid} | sed 's/UTF-8//' | wc -l) -eq 0 ]; then
LANG=C
LANGUAGE=C:en
fi
export LANG export LANG
export LANGUAGE export LANGUAGE
export PAPERSIZE export PAPERSIZE