diff options
-rw-r--r-- | lib/sisu/v3/i18n.rb | 5 | ||||
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 3 |
2 files changed, 5 insertions, 3 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], diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index f757233f..a1c6228b 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -58,6 +58,7 @@ =end @@cX=nil @@current_document=Dir.pwd #nil #'' +@@lang_info=nil module SiSU_Env require_relative 'constants' # constants.rb require 'fileutils' @@ -800,7 +801,7 @@ module SiSU_Env @lang_info=SiSU_i18n::Languages.new end def lang_lst # from i18n - @lang_info.language.list + @@lang_info ||=@lang_info.language.list end def lang(l='') # from i18n x=if l =~/^#{@r}$/ |