slitaz-tools diff tinyutils/tazlocale @ rev 593
Tiny edits
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sat Apr 30 16:27:52 2011 +0100 (2011-04-30) |
parents | 6017afdaa1ee |
children | e2f467522651 |
line diff
1.1 --- a/tinyutils/tazlocale Tue Feb 02 19:34:03 2010 +0100 1.2 +++ b/tinyutils/tazlocale Sat Apr 30 16:27:52 2011 +0100 1.3 @@ -3,7 +3,7 @@ 1.4 # Tazlocale: SliTaz GNU/Linux locale setting using dialog boxes. 1.5 # Configuration file is : /etc/locale.conf 1.6 # 1.7 -# 20100201 <pankso@slitaz.org> - GNU gpl. 1.8 +# 20110429 <pankso@slitaz.org> - GNU gpl. 1.9 # 1.10 1.11 # Check if user is root. 1.12 @@ -48,7 +48,7 @@ 1.13 ln -s index.$LANGUAGE.html index.html 1.14 fi 1.15 # SliTaz Software Manuals 1.16 - for soft in tazpkg tazlito tazusb tazwok 1.17 + for soft in tazpkg tazlito tazusb tazwok burnbox tazweb 1.18 do 1.19 if [ -f /usr/share/doc/$soft/$soft.$LANGUAGE.html ]; then 1.20 cd /usr/share/doc/$soft && rm -f $soft.html 1.21 @@ -60,10 +60,9 @@ 1.22 # Locale name displayed. 1.23 get_locale_name() 1.24 { 1.25 - for i in `ls -1 /usr/share/i18n/locales/ | grep ^[a-z][a-z]_[A-Z][A-Z]` 1.26 + for i in `ls -1 /usr/share/i18n/locales | grep ^[a-z][a-z]_[A-Z][A-Z]` 1.27 do 1.28 - #name=`locale -a -v | grep -A 2 "locale: $i" | grep "title" | \ 1.29 - # cut -d " " -f 7` 1.30 + #desc=$(grep ^title /usr/share/i18n/locales/$i | cut -d '"' -f 2) 1.31 echo "$i Locale" 1.32 done 1.33 } 1.34 @@ -122,12 +121,17 @@ 1.35 *_*) 1.36 # Execute functions (can be called from an other apps). 1.37 $1 ;; 1.38 - link-files) 1.39 - link_language_files ;; 1.40 list) 1.41 echo "" 1.42 locale -a 1.43 echo "" ;; 1.44 + init) 1.45 + # This command can be used to change system locale from cmdline. 1.46 + locale=$2 1.47 + echo "LANG=$locale" > /etc/locale.conf 1.48 + echo "LC_ALL=$locale" >> /etc/locale.conf 1.49 + gen_utf8_locale 1.50 + link_language_files ;; 1.51 *) 1.52 : ${DIALOG=dialog} 1.53 dialog_menu