| Copyright | (c) 2013-2021 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
Amazonka.Translate.TranslateText
Description
Translates input text from the source language to the target language. For a list of available languages and language codes, see what-is-languages.
Synopsis
- data TranslateText = TranslateText' {}
- newTranslateText :: Text -> Text -> Text -> TranslateText
- translateText_terminologyNames :: Lens' TranslateText (Maybe [Text])
- translateText_text :: Lens' TranslateText Text
- translateText_sourceLanguageCode :: Lens' TranslateText Text
- translateText_targetLanguageCode :: Lens' TranslateText Text
- data TranslateTextResponse = TranslateTextResponse' {}
- newTranslateTextResponse :: Int -> Text -> Text -> Text -> TranslateTextResponse
- translateTextResponse_appliedTerminologies :: Lens' TranslateTextResponse (Maybe [AppliedTerminology])
- translateTextResponse_httpStatus :: Lens' TranslateTextResponse Int
- translateTextResponse_translatedText :: Lens' TranslateTextResponse Text
- translateTextResponse_sourceLanguageCode :: Lens' TranslateTextResponse Text
- translateTextResponse_targetLanguageCode :: Lens' TranslateTextResponse Text
Creating a Request
data TranslateText Source #
See: newTranslateText smart constructor.
Constructors
| TranslateText' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> Text | |
| -> Text | |
| -> TranslateText |
Create a value of TranslateText with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:terminologyNames:TranslateText', translateText_terminologyNames - The name of the terminology list file to be used in the TranslateText
request. You can use 1 terminology list at most in a TranslateText
request. Terminology lists can contain a maximum of 256 terms.
$sel:text:TranslateText', translateText_text - The text to translate. The text string can be a maximum of 5,000 bytes
long. Depending on your character set, this may be fewer than 5,000
characters.
$sel:sourceLanguageCode:TranslateText', translateText_sourceLanguageCode - The language code for the language of the source text. The language must
be a language supported by Amazon Translate. For a list of language
codes, see what-is-languages.
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.
$sel:targetLanguageCode:TranslateText', translateText_targetLanguageCode - The language code requested for the language of the target text. The
language must be a language supported by Amazon Translate.
Request Lenses
translateText_terminologyNames :: Lens' TranslateText (Maybe [Text]) Source #
The name of the terminology list file to be used in the TranslateText
request. You can use 1 terminology list at most in a TranslateText
request. Terminology lists can contain a maximum of 256 terms.
translateText_text :: Lens' TranslateText Text Source #
The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
translateText_sourceLanguageCode :: Lens' TranslateText Text Source #
The language code for the language of the source text. The language must be a language supported by Amazon Translate. For a list of language codes, see what-is-languages.
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.
translateText_targetLanguageCode :: Lens' TranslateText Text Source #
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
Destructuring the Response
data TranslateTextResponse Source #
See: newTranslateTextResponse smart constructor.
Constructors
| TranslateTextResponse' | |
Fields
| |
Instances
newTranslateTextResponse Source #
Arguments
| :: Int | |
| -> Text | |
| -> Text | |
| -> Text | |
| -> TranslateTextResponse |
Create a value of TranslateTextResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:appliedTerminologies:TranslateTextResponse', translateTextResponse_appliedTerminologies - The names of the custom terminologies applied to the input text by
Amazon Translate for the translated text response.
$sel:httpStatus:TranslateTextResponse', translateTextResponse_httpStatus - The response's http status code.
$sel:translatedText:TranslateTextResponse', translateTextResponse_translatedText - The translated text.
$sel:sourceLanguageCode:TranslateText', translateTextResponse_sourceLanguageCode - The language code for the language of the source text.
$sel:targetLanguageCode:TranslateText', translateTextResponse_targetLanguageCode - The language code for the language of the target text.
Response Lenses
translateTextResponse_appliedTerminologies :: Lens' TranslateTextResponse (Maybe [AppliedTerminology]) Source #
The names of the custom terminologies applied to the input text by Amazon Translate for the translated text response.
translateTextResponse_httpStatus :: Lens' TranslateTextResponse Int Source #
The response's http status code.
translateTextResponse_translatedText :: Lens' TranslateTextResponse Text Source #
The translated text.
translateTextResponse_sourceLanguageCode :: Lens' TranslateTextResponse Text Source #
The language code for the language of the source text.
translateTextResponse_targetLanguageCode :: Lens' TranslateTextResponse Text Source #
The language code for the language of the target text.