Class: IsoDoc::Ogc::I18n

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

Instance Method Summary collapse

Instance Method Details

#load_file(fname) ⇒ Object



4
5
6
7
# File 'lib/isodoc/ogc/i18n.rb', line 4

def load_file(fname)
  f = File.join(File.dirname(__FILE__), fname)
  File.exist?(f) ? YAML.load_file(f) : {}
end

#load_yaml1(lang, script) ⇒ Object



9
10
11
12
# File 'lib/isodoc/ogc/i18n.rb', line 9

def load_yaml1(lang, script)
  y = load_file("i18n-#{yaml_lang(lang, script)}.yaml")
  y.empty? ? load_file("i18n-en.yaml").merge(super) : super.deep_merge(y)
end