From: ivan Date: Thu, 12 May 2011 23:31:35 +0000 (+0000) Subject: i18n, RT#12515 X-Git-Tag: freeside_2_3_0~262 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=22a59960edd8f446d82c60f9ca5ac9b957ef2eac;p=freeside.git i18n, RT#12515 --- diff --git a/FS/FS/L10N/DBI.pm b/FS/FS/L10N/DBI.pm new file mode 100644 index 000000000..2f01a6ad3 --- /dev/null +++ b/FS/FS/L10N/DBI.pm @@ -0,0 +1,22 @@ +package FS::L10N::DBI; +use base qw(FS::L10N); +use strict; +use FS::Msgcat; + +our %Lexicon = (); + +sub maketext { + my($lh, $key, @rest) = @_; + + unless ( exists $Lexicon{$key} ) { + my $lang = $lh->language_tag; + $lang =~ s/-(\w*)/_\U$1/; + $Lexicon{$key} = FS::Msgcat::_gettext( $key, $lang ); + } + + $lh->SUPER::maketext($key, @rest); + +} + +1; + diff --git a/FS/FS/L10N/en_us.pm b/FS/FS/L10N/en_us.pm new file mode 100644 index 000000000..e8a592d78 --- /dev/null +++ b/FS/FS/L10N/en_us.pm @@ -0,0 +1,7 @@ +package FS::L10N::en_us; +use base qw(FS::L10N); +#use strict; + +our %Lexicon = ( _AUTO=>1 ); + +1; diff --git a/FS/FS/L10N/iw_il.pm b/FS/FS/L10N/iw_il.pm new file mode 100644 index 000000000..e1e2c66b5 --- /dev/null +++ b/FS/FS/L10N/iw_il.pm @@ -0,0 +1,4 @@ +package FS::L10N::iw_il; +use base qw(FS::L10N::DBI); + +1;