amazonka-translate-1.6.0: Amazon Translate SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Translate.TranslateText

Contents

Description

Translates input text from the source language to the target language. You can translate between English (en) and one of the following languages, or between one of the following languages and English.

  • Arabic (ar)
  • Chinese (Simplified) (zh)
  • French (fr)
  • German (de)
  • Portuguese (pt)
  • Spanish (es)

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.

Synopsis

Creating a Request

translateText Source #

Creates a value of TranslateText with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • ttText - The text to translate.
  • ttSourceLanguageCode - 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.
  • ttTargetLanguageCode - One of the supported language codes for the target text. If the SourceLanguageCode is not "en", the TargetLanguageCode must be "en".

data TranslateText Source #

See: translateText smart constructor.

Instances

Eq TranslateText Source # 
Data TranslateText Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TranslateText -> c TranslateText #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TranslateText #

toConstr :: TranslateText -> Constr #

dataTypeOf :: TranslateText -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TranslateText) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TranslateText) #

gmapT :: (forall b. Data b => b -> b) -> TranslateText -> TranslateText #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TranslateText -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TranslateText -> r #

gmapQ :: (forall d. Data d => d -> u) -> TranslateText -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TranslateText -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TranslateText -> m TranslateText #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslateText -> m TranslateText #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslateText -> m TranslateText #

Read TranslateText Source # 
Show TranslateText Source # 
Generic TranslateText Source # 

Associated Types

type Rep TranslateText :: * -> * #

Hashable TranslateText Source # 
ToJSON TranslateText Source # 
NFData TranslateText Source # 

Methods

rnf :: TranslateText -> () #

AWSRequest TranslateText Source # 
ToHeaders TranslateText Source # 
ToPath TranslateText Source # 
ToQuery TranslateText Source # 
type Rep TranslateText Source # 
type Rep TranslateText = D1 * (MetaData "TranslateText" "Network.AWS.Translate.TranslateText" "amazonka-translate-1.6.0-8jNsiXBM2z4HEB5XL7Zyr0" False) (C1 * (MetaCons "TranslateText'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_ttText") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "_ttSourceLanguageCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_ttTargetLanguageCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))
type Rs TranslateText Source # 

Request Lenses

ttText :: Lens' TranslateText Text Source #

The text to translate.

ttSourceLanguageCode :: Lens' TranslateText Text Source #

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.

ttTargetLanguageCode :: Lens' TranslateText Text Source #

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

Destructuring the Response

translateTextResponse Source #

Creates a value of TranslateTextResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data TranslateTextResponse Source #

See: translateTextResponse smart constructor.

Instances

Eq TranslateTextResponse Source # 
Data TranslateTextResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TranslateTextResponse -> c TranslateTextResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TranslateTextResponse #

toConstr :: TranslateTextResponse -> Constr #

dataTypeOf :: TranslateTextResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TranslateTextResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TranslateTextResponse) #

gmapT :: (forall b. Data b => b -> b) -> TranslateTextResponse -> TranslateTextResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TranslateTextResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TranslateTextResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> TranslateTextResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TranslateTextResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TranslateTextResponse -> m TranslateTextResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslateTextResponse -> m TranslateTextResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslateTextResponse -> m TranslateTextResponse #

Read TranslateTextResponse Source # 
Show TranslateTextResponse Source # 
Generic TranslateTextResponse Source # 
NFData TranslateTextResponse Source # 

Methods

rnf :: TranslateTextResponse -> () #

type Rep TranslateTextResponse Source # 
type Rep TranslateTextResponse = D1 * (MetaData "TranslateTextResponse" "Network.AWS.Translate.TranslateText" "amazonka-translate-1.6.0-8jNsiXBM2z4HEB5XL7Zyr0" False) (C1 * (MetaCons "TranslateTextResponse'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_ttrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "_ttrsTranslatedText") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_ttrsSourceLanguageCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_ttrsTargetLanguageCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))

Response Lenses

ttrsResponseStatus :: Lens' TranslateTextResponse Int Source #

  • - | The response status code.

ttrsTranslatedText :: Lens' TranslateTextResponse Text Source #

The text translated into the target language.

ttrsSourceLanguageCode :: Lens' TranslateTextResponse Text Source #

The language code for the language of the input text.

ttrsTargetLanguageCode :: Lens' TranslateTextResponse Text Source #

The language code for the language of the translated text.