diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-23 20:14:15 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-23 20:14:15 +0000 |
commit | 56aefde186c4eba2ddd34017980d35683985417a (patch) | |
tree | 6203ab594f9ad4af65cf2221e8adf06939cc049d /bin | |
parent | af66021ef163a3f51895db8eb89c957d292f8997 (diff) |
Convert locales to Locale::Maketext::Lexicon
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@264 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/admin.pl | 7 | ||||
-rwxr-xr-x | bin/am.pl | 1 | ||||
-rwxr-xr-x | bin/login.pl | 7 | ||||
-rwxr-xr-x | bin/oe.pl | 6 |
4 files changed, 15 insertions, 6 deletions
diff --git a/bin/admin.pl b/bin/admin.pl index deac8655..ce96cd6e 100755 --- a/bin/admin.pl +++ b/bin/admin.pl @@ -37,13 +37,16 @@ $menufile = "menu.ini"; use LedgerSMB::Form; +use LedgerSMB::Locale; use LedgerSMB::User; $form = new Form; -$locale = new Locale $language, "admin"; -$form->{charset} = $locale->{charset}; +$locale = LedgerSMB::Locale->get_handle($language); +$locale->encoding('UTF-8'); +$form->{charset} = 'UTF-8'; +#$form->{charset} = $locale->encoding; eval { require DBI; }; $form->error($locale->text('DBI not installed!')) if ($@); @@ -2050,7 +2050,6 @@ sub config { foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } keys %countrycodes) { $countrycodes .= ($myconfig{countrycode} eq $key) ? "<option selected value=$key>$countrycodes{$key}\n" : "<option value=$key>$countrycodes{$key}\n"; } - $countrycodes = qq|<option value="">English\n$countrycodes|; opendir CSS, "css/."; @all = grep /.*\.css$/, readdir CSS; diff --git a/bin/login.pl b/bin/login.pl index fbfdf431..c52c3b9e 100755 --- a/bin/login.pl +++ b/bin/login.pl @@ -39,6 +39,7 @@ use DBI; use LedgerSMB::User; use LedgerSMB::Form; +use LedgerSMB::Locale; ## will need this later when session_destroy will be used #use LedgerSMB::Session; @@ -46,8 +47,10 @@ use LedgerSMB::Form; $form = new Form; -$locale = new Locale $language, "login"; -$form->{charset} = $locale->{charset}; +$locale = LedgerSMB::Locale->get_handle($language); +$locale->encoding('UTF-8'); +$form->{charset} = 'UTF-8'; +#$form->{charset} = $locale->encoding; # customization if (-f "bin/custom/$form->{script}") { @@ -45,6 +45,7 @@ use LedgerSMB::IR; use LedgerSMB::IS; use LedgerSMB::PE; use LedgerSMB::Tax; +use LedgerSMB::Locale; require "bin/arap.pl"; require "bin/io.pl"; @@ -1944,7 +1945,10 @@ sub invoice { $form->{type} = "invoice"; # locale messages - $locale = new Locale "$myconfig{countrycode}", "$script"; + $locale = LedgerSMB::Locale->get_handle($myconfig{countrycode}); + #$form->{charset} = $locale->encoding; + $form->{charset} = 'UTF-8'; + $locale->encoding('UTF-8'); require "bin/$form->{script}"; |