def translate(sentences, to:, **options)
      results = post(
        '/translate',
        body: build_sentences(sentences).to_json,
        query: Hash[to: to, **options]
      )

      results.map { |r| Types::TranslationResult.new(r) }
    end
def translate(sentences, to:, **options)
      results = post(
        '/translate',
        body: build_sentences(sentences).to_json,
        query: Hash[to: to, **options]
      )

      results.map { |r| Types::TranslationResult.new(r) }
    end
Initialize the client
 @since 1.0.0

 @param api_key [String] the Cognitive Services API Key
 Translate a group of sentences.

 The following limitations apply:
 * The array _sentences_ can have at most 25 elements.
 * The entire text included in the request cannot exceed 5,000 characters including spaces.
 @see https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-translate

 @param sentences [Array<String, TranslatorText::Types::Sentence>] the sentences to process
 @param to [Symbol] Specifies the language of the output text (required)
 @param options [Hash] the optional options to transmit to the service. Consult the API documentation for the exhaustive available options.
 @return [Array<TranslatorText::Types::TranslationResult>] the translation results