Method: IsoDoc::PresentationXMLConvert#i8n_name

Defined in:
lib/isodoc/presentation_function/metadata.rb

#i8n_name(hash, pref) ⇒ Object



94
95
96
97
98
99
100
101
102
103
104
# File 'lib/isodoc/presentation_function/metadata.rb', line 94

def i8n_name(hash, pref)
  case hash
  when Hash then i8n_name1(hash, pref)
  when Array
    hash.reject { |a| blank?(a) }.each_with_object([])
      .with_index do |(v1, g), i|
        i8n_name(v1, "#{i18n_safe(k)}.#{i}").each { |x| g << x }
      end
  else [i18n_tag(pref, hash)]
  end
end