Sha256: fc97c45917dd52e33e7be73d81013ed8dbfad0cccba660e2c5933b5eb2d5357b

Contents?: true

Size: 292 Bytes

Versions: 1

Compression:

Stored size: 292 Bytes

Contents

require 'easy_translate'

module I18n::Tasks::GoogleTranslation
  def google_translate(strings, opts)
    return [] if strings.empty?
    opts = opts.dup
    if (key = translation_config[:api_key]).present?
      opts[:key] ||= key
    end
    EasyTranslate.translate strings, opts
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n-tasks-0.2.2 lib/i18n/tasks/google_translation.rb