| Server IP : 34.67.85.211 / Your IP : 216.73.217.52 Web Server : Apache System : Linux wordpress-1-vm 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 User : root ( 0) PHP Version : 7.4.9 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/sbin/ |
Upload File : |
#!/bin/sh
set -e
LOCALEGEN=/etc/locale.gen
LOCALES=/usr/share/i18n/locales
USER_LOCALES=/usr/local/share/i18n/locales
if [ -n "$POSIXLY_CORRECT" ]; then
unset POSIXLY_CORRECT
fi
[ -f $LOCALEGEN ] || exit 0;
[ -s $LOCALEGEN ] || exit 0;
KEEP=
if [ "$1" = '--keep-existing' ]; then
KEEP=1
fi
if [ -z "$KEEP" ]; then
# Remove all old locale dir and locale-archive before generating new
# locale data.
rm -rf /usr/lib/locale/locale-archive || true
fi
umask 022
is_entry_ok() {
if [ -n "$locale" -a -n "$charset" ] ; then
true
else
echo "error: Bad entry '$locale $charset'"
false
fi
}
echo "Generating locales (this might take a while)..."
while read locale charset; do \
case $locale in \#*) continue;; "") continue;; esac; \
is_entry_ok || continue
if [ "$KEEP" ] && PERL_BADLANG=0 perl -MPOSIX -e \
'exit 1 unless setlocale(LC_ALL, $ARGV[0])' "$locale"; then
continue
fi
echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
echo -n ".$charset"; \
echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
echo -n '...'; \
if [ -f $USER_LOCALES/$locale ] ; then
input=$USER_LOCALES/$locale
elif [ -f $LOCALES/$locale ]; then
input=$locale
else
input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`
if [ -f $USER_LOCALES/$input ]; then
input=$USER_LOCALES/$input
fi
fi
localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale || :; \
echo ' done'; \
done < $LOCALEGEN
echo "Generation complete."