def translate key = nil, scope: nil, retries: nil, timeout: nil
      Google::Cloud.translate key, project_id: @project, credentials: @keyfile,
                                   scope: scope,
                                   retries: (retries || @retries),
                                   timeout: (timeout || @timeout)
    end
def translate key = nil, scope: nil, retries: nil, timeout: nil
      Google::Cloud.translate key, project_id: @project, credentials: @keyfile,
                                   scope: scope,
                                   retries: (retries || @retries),
                                   timeout: (timeout || @timeout)
    end
Creates a new object for connecting to the Cloud Translation API. Each
 call creates a new connection.

 Like other Cloud Platform services, Google Cloud Translation API supports
 authentication using a project ID and OAuth 2.0 credentials. In addition,
 it supports authentication using a public API access key. (If both the API
 key and the project and OAuth 2.0 credentials are provided, the API key
 will be used.) Instructions and configuration options are covered in the
 {file:AUTHENTICATION.md Authentication Guide}.

 @param [String] key a public API access key (not an OAuth 2.0 token)
 @param [String, Array<String>] scope The OAuth 2.0 scopes controlling the
   set of resources and operations that the connection can access. See
   [Using OAuth 2.0 to Access Google
   APIs](https://developers.google.com/identity/protocols/OAuth2).

   The default scope is:

   * `https://www.googleapis.com/auth/cloud-platform`
 @param [Integer] retries Number of times to retry requests on server
   error. The default value is `3`. Optional.
 @param [Integer] timeout Default timeout to use in requests. Optional.

 @return [Google::Cloud::Translate::Api]

 @example
   require "google/cloud"

   gcloud = Google::Cloud.new
   translate = gcloud.translate "api-key-abc123XYZ789"

   translation = translate.translate "Hello world!", to: "la"
   translation.text #=> "Salve mundi!"

 @example Using API Key from the environment variable.
   require "google/cloud"

   ENV["TRANSLATE_KEY"] = "api-key-abc123XYZ789"

   gcloud = Google::Cloud.new
   translate = gcloud.translate

   translation = translate.translate "Hello world!", to: "la"
   translation.text #=> "Salve mundi!"