Class: IsoDoc::I18n

Inherits:
Object
  • Object
show all
Defined in:
lib/isodoc/i18n.rb

Instance Method Summary collapse

Instance Method Details

#load_yaml1(lang, script) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/isodoc/i18n.rb', line 10

def load_yaml1(lang, script)
  case lang
  when "en", "fr", "ru", "de", "es", "ar"
    load_yaml2(lang)
  when "zh"
    if script == "Hans" then load_yaml2("zh-Hans")
    else load_yaml2("en")
    end
  else
    load_yaml2("en")
  end
end

#load_yaml2(str) ⇒ Object



23
24
25
26
# File 'lib/isodoc/i18n.rb', line 23

def load_yaml2(str)
  YAML.load_file(File.join(File.dirname(__FILE__),
                           "../isodoc-yaml/i18n-#{str}.yaml"))
end