Class: IsoDoc::Iso::I18n
- Inherits:
-
IsoDoc::I18n
- Object
- IsoDoc::I18n
- IsoDoc::Iso::I18n
- Defined in:
- lib/isodoc/iso/i18n.rb
Instance Method Summary collapse
Instance Method Details
#load_file(fname) ⇒ Object
4 5 6 |
# File 'lib/isodoc/iso/i18n.rb', line 4 def load_file(fname) YAML.load_file(File.join(File.dirname(__FILE__), fname)) end |
#load_yaml1(lang, script) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/isodoc/iso/i18n.rb', line 8 def load_yaml1(lang, script) y = if lang == "en" then load_file("i18n-en.yaml") elsif lang == "fr" then load_file("i18n-fr.yaml") elsif lang == "ru" then load_file("i18n-ru.yaml") elsif lang == "zh" && script == "Hans" load_file("i18n-zh-Hans.yaml") else load_file("i18n-en.yaml") end super.deep_merge(y) end |