diff options
Diffstat (limited to 'perl-install/standalone')
-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); |