summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-05-12 23:31:35 +0000
committerivan <ivan>2011-05-12 23:31:35 +0000
commit22a59960edd8f446d82c60f9ca5ac9b957ef2eac (patch)
tree104596499b929272f6bcbed04427dc782641ca18
parent3aa57c0b48933b3d723b3b69e858049ac7c01380 (diff)
i18n, RT#12515
-rw-r--r--FS/FS/L10N/DBI.pm22
-rw-r--r--FS/FS/L10N/en_us.pm7
-rw-r--r--FS/FS/L10N/iw_il.pm4
3 files changed, 33 insertions, 0 deletions
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;