Skip to content

Commit

Permalink
Merge branch 'master' into lc_ctype
Browse files Browse the repository at this point in the history
  • Loading branch information
PanderMusubi authored Apr 21, 2024
2 parents befdae7 + d5a931d commit 261159e
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@ if [ `id -u` -ne 0 ]; then
fi

# add locale
cp -f en_NL /usr/share/i18n/locales/
if [ -d /usr/share/i18n/ ]; then
cp -f en_NL /usr/share/i18n/locales/
else
echo "ERROR: No /usr/share/i18n/ directory, install glibc-i18ndata"
exit 1
fi

# register locale
if [ `grep ^en_NL /etc/locale.gen|wc -l` -eq 0 ]; then
echo "en_NL.UTF-8 UTF-8" >> /etc/locale.gen
fi
if [ -f /etc/locale.gen ]; then
if [ `grep ^en_NL /etc/locale.gen|wc -l` -eq 0 ]; then
echo "en_NL.UTF-8 UTF-8" >> /etc/locale.gen
fi

# regenerate locales
locale-gen

# update Xlib database (see https://xyne.dev/projects/locale-en_xx/#usage)
file=/usr/share/X11/locale/locale.dir
Expand All @@ -31,6 +40,12 @@ fi

# regenerate locales
locale-gen
#elif [ -x /usr/bin/localedef ]; then
# /usr/bin/localedef -f UTF-8 -i en_NL en_NL.UTF-8
#else
# echo "ERROR: Do not know how to register locale"
# exit 1
#fi

# list locale
locale -a|grep en_NL

0 comments on commit 261159e

Please sign in to comment.