Server IP : 127.0.0.2 / Your IP : 3.134.81.178 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/locales/ |
Upload File : |
#!/bin/sh -e if [ -z "$1" ]; then echo "Usage: $0 <language code> <class> [<version>]" exit 0 fi # Copied from locale-gen normalize_locale() { # Insert a leading x in case $1 begins with a dash this_locale=x$1 charset= if echo $this_locale | LC_ALL=C grep '\.' > /dev/null 2>&1; then charset=$(echo $this_locale | sed -e 's/^x//' -e 's/.*\(\.[^@]*\).*/\1/' | LC_ALL=C tr '[A-Z]' '[a-z]' | LC_ALL=C sed -e 's/[^a-z0-9.]//g') fi modifier= if echo $this_locale | LC_ALL=C grep '@' > /dev/null 2>&1; then modifier=$(echo $this_locale | sed -e 's/^x//' -e 's/.*\(@[^.]*\).*/\1/') fi main=$(echo $this_locale | sed -e 's/^x//' -e 's/[.@].*//') echo $main$charset$modifier } get_supported_local_normalized() { [ -e /etc/locale.gen ] || return 0 sort -u /etc/locale.gen | while read locale charset; do case $locale in \#*) continue ;; "") continue ;; esac normalize_locale "$locale" done } remove_locale() { this_locale=$(normalize_locale "$1") if ! echo "$supported_local_normalized" | fgrep -qx "$this_locale"; then if [ -e /usr/lib/locale/locale-archive ]; then localedef --delete-from-archive "$this_locale" fi fi } # remove binary locales # do nothing for gnome/kde if [ -z "$2" ]; then # do not remove locales if we merely remove language-support-* without # removing language-pack-* if [ ! -e /var/lib/locales/supported.d/$1 ]; then supported_local_normalized="$(get_supported_local_normalized)" if [ "$1" = 'zh-hans' ]; then remove_locale zh_CN.utf8 remove_locale zh_SG.utf8 elif [ "$1" = 'zh-hant' ]; then remove_locale zh_HK.utf8 remove_locale zh_TW.utf8 else if [ -e /usr/lib/locale/locale-archive ]; then for l in $(localedef --list-archive|grep "^$1[._@]"); do remove_locale "$l" done fi fi fi fi # ensure that .desktop caches are up to date dpkg-trigger gmenucache || true