You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Translate::Types::TranslateTextRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-translate/lib/aws-sdk-translate/types.rb

Overview

Note:

When making an API call, you may pass TranslateTextRequest data as a hash:

{
  text: "BoundedLengthString", # required
  source_language_code: "LanguageCodeString", # required
  target_language_code: "LanguageCodeString", # required
}

Instance Attribute Summary collapse

Instance Attribute Details

#source_language_codeString

One of the supported language codes for the source text. If the TargetLanguageCode is not "en", the SourceLanguageCode must be "en".

To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.

Returns:

  • (String)


43
44
45
46
47
48
# File 'gems/aws-sdk-translate/lib/aws-sdk-translate/types.rb', line 43

class TranslateTextRequest < Struct.new(
  :text,
  :source_language_code,
  :target_language_code)
  include Aws::Structure
end

#target_language_codeString

One of the supported language codes for the target text. If the SourceLanguageCode is not "en", the TargetLanguageCode must be "en".

Returns:

  • (String)


43
44
45
46
47
48
# File 'gems/aws-sdk-translate/lib/aws-sdk-translate/types.rb', line 43

class TranslateTextRequest < Struct.new(
  :text,
  :source_language_code,
  :target_language_code)
  include Aws::Structure
end

#textString

The text to translate.

Returns:

  • (String)


43
44
45
46
47
48
# File 'gems/aws-sdk-translate/lib/aws-sdk-translate/types.rb', line 43

class TranslateTextRequest < Struct.new(
  :text,
  :source_language_code,
  :target_language_code)
  include Aws::Structure
end