Method: IsoDoc::Function::I18n#eref_localities1

Defined in:
lib/isodoc/function/i18n.rb

#eref_localities1(target, type, from, to, lang = "en") ⇒ Object

TODO: move to localization file



88
89
90
91
92
93
94
95
96
# File 'lib/isodoc/function/i18n.rb', line 88

def eref_localities1(target, type, from, to, lang = "en")
  return l10n(eref_localities1_zh(target, type, from, to)) if lang == "zh"
  ret = ","
  loc = @locality[type] || type.sub(/^locality:/, "").capitalize
  ret += " #{loc}"
  ret += " #{from.text}" if from
  ret += "–#{to.text}" if to
  l10n(ret)
end