diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-05-05 22:09:45 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-05-05 22:09:48 -0400 |
commit | 8b7a793a7752bf7c562fc19e3bf9f05bfcdc7a64 (patch) | |
tree | 756f39fe59584723713c41c1defe9976a9062942 /lib/sisu/v3/i18n.rb | |
parent | v3: date, version, changelog (diff) |
v3: i18n, sysenv, class variable to prevent unnecessary re-construction of hashsisu_3.0.8
* prevent program from becoming as slow as treacle, a fix
Diffstat (limited to 'lib/sisu/v3/i18n.rb')
-rw-r--r-- | lib/sisu/v3/i18n.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sisu/v3/i18n.rb b/lib/sisu/v3/i18n.rb index 683e6098..1001b6fb 100644 --- a/lib/sisu/v3/i18n.rb +++ b/lib/sisu/v3/i18n.rb @@ -57,10 +57,11 @@ =end module SiSU_i18n + @@language_table,@@language_list=nil,nil class Languages def language def table - list= { + @@language_table ||= { am: { c: 'am', n: 'Amharic', xlp: 'amharic'}, bg: { c: 'bg', n: 'Bulgarian', xlp: 'bulgarian'}, bn: { c: 'bn', n: 'Bengali', xlp: 'bengali'}, @@ -123,7 +124,7 @@ module SiSU_i18n } end def list - list= { + @@language_list ||= { 'am' => table[:am], 'bg' => table[:bg], 'bn' => table[:bn], |