diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-02-16 17:14:44 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-02-16 17:14:44 +0000 |
commit | cecb6d81492916c857f69bc434021185eb3e15b6 (patch) | |
tree | db3ea02a60283d82c302a2a48a8efa5b28d63e50 /perl-install/standalone/localedrake | |
parent | d063d206d800f966883e12292795d7c3e1e36841 (diff) | |
download | drakx-cecb6d81492916c857f69bc434021185eb3e15b6.tar drakx-cecb6d81492916c857f69bc434021185eb3e15b6.tar.gz drakx-cecb6d81492916c857f69bc434021185eb3e15b6.tar.bz2 drakx-cecb6d81492916c857f69bc434021185eb3e15b6.tar.xz drakx-cecb6d81492916c857f69bc434021185eb3e15b6.zip |
handle --kde_country=<country>
Diffstat (limited to 'perl-install/standalone/localedrake')
-rw-r--r-- | perl-install/standalone/localedrake | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/perl-install/standalone/localedrake b/perl-install/standalone/localedrake index b3c94d5cb..55e61ace8 100644 --- a/perl-install/standalone/localedrake +++ b/perl-install/standalone/localedrake @@ -8,21 +8,28 @@ use interactive; use lang; use any; -my $in = 'interactive'->vnew; -my $file = $> ? "$ENV{HOME}/.i18n" : '/etc/sysconfig/i18n'; -my ($lang, $langs) = lang::read('', $file); -$langs = '' if $>; -if ($lang = any::selectLanguage($in, $lang, $langs)) { +if ($ARGV[0] =~ /--kde_country=(.*)/) { + my $lang = lang::country2lang($1); lang::write('', $lang, $>); - lang::write_langs('', $langs) if $langs; + + #- help KDE defaulting to the right charset + print lang::charset2kde_charset(lang::lang2charset($lang)), "\n"; +} else { + my ($lang, $langs) = lang::read('', $>); + + my $in = 'interactive'->vnew; + if ($lang = any::selectLanguage($in, $lang, $langs)) { + lang::write('', $lang, $>); + lang::write_langs('', $langs) if $langs; if ($>) { - if (my $wm = any::running_window_manager()) { + if (my $wm = any::running_window_manager()) { $in->ask_warn('', _("Please relog into %s to activate the changes", ucfirst (lc $wm)), 1); any::ask_window_manager_to_logout($wm); - } + } } + } + $in->exit(0); } -$in->exit(0); |