Safe Haskell | None |
---|---|
Language | Haskell2010 |
Servant types and client for the API
- basicTranslate :: Manager -> AuthToken -> Maybe Language -> Language -> Text -> IO (Either TranslatorException Text)
- basicTranslateArray :: Manager -> AuthToken -> Language -> Language -> [Text] -> IO (Either TranslatorException ArrayResponse)
- data TranslatorException
- data Language
- = Afrikaans
- | Arabic
- | Bosnian
- | Bulgarian
- | Catalan
- | ChineseSimplified
- | ChineseTraditional
- | Croatian
- | Czech
- | Danish
- | Dutch
- | English
- | Estonian
- | Finnish
- | French
- | German
- | Greek
- | HaitianCreole
- | Hebrew
- | Hindi
- | HmongDaw
- | Hungarian
- | Indonesian
- | Italian
- | Japanese
- | Kiswahili
- | Klingon
- | KlingonPIqaD
- | Korean
- | Latvian
- | Lithuanian
- | Malay
- | Maltese
- | Norwegian
- | Persian
- | Polish
- | Portuguese
- | QueretaroOtomi
- | Romanian
- | Russian
- | SerbianCyrillic
- | SerbianLatin
- | Slovak
- | Slovenian
- | Spanish
- | Swedish
- | Thai
- | Turkish
- | Ukrainian
- | Urdu
- | Vietnamese
- | Welsh
- | YucatecMaya
- data ArrayRequest = ArrayRequest {}
- newtype ArrayResponse = ArrayResponse {}
- data TransItem = TransItem {
- transText :: Text
- originalBreaks :: [Int]
- translatedBreaks :: [Int]
Documentation
basicTranslate :: Manager -> AuthToken -> Maybe Language -> Language -> Text -> IO (Either TranslatorException Text) Source #
Most basic possible text translation function. For typical use-cases it will be much
more convenient to use functions from the Microsoft.Translator module, namely
translateIO
. See the README example.
basicTranslateArray :: Manager -> AuthToken -> Language -> Language -> [Text] -> IO (Either TranslatorException ArrayResponse) Source #
Most basic possible text list translation function. For typical use-cases it will
be much more convenient to use functions from the Microsoft.Translator module, namely
translateArrayIO
. See the README example.
data TranslatorException Source #
Languages supported by MS Microsoft.Translator
data ArrayRequest Source #
newtype ArrayResponse Source #