Sha256: 815bc55669ede0a0bd82d6ee28688656a12ba6f0d7aae657aebc2e9705795693

Contents?: true

Size: 551 Bytes

Versions: 8

Compression:

Stored size: 551 Bytes

Contents

require "yaml"
require "isodoc-i18n"
require_relative "function/utils"

module IsoDoc
  class I18n
    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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
isodoc-2.1.1 lib/isodoc/i18n.rb
isodoc-2.1.0.2 lib/isodoc/i18n.rb
isodoc-2.1.0.1 lib/isodoc/i18n.rb
isodoc-2.1.0 lib/isodoc/i18n.rb
isodoc-2.0.8.2 lib/isodoc/i18n.rb
isodoc-2.0.8.1 lib/isodoc/i18n.rb
isodoc-2.0.8 lib/isodoc/i18n.rb
isodoc-2.0.7 lib/isodoc/i18n.rb