Search Results for

    Show / Hide Table of Contents

    Method GetTranslatedText

    GetTranslatedText(String, String, String, List<String>)

    Get a text translated in several languages

    Declaration
    TranslationResultContract GetTranslatedText(string connectionId, string input, string sourceLanguage, List<string> targetLanguages)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    System.String input

    Text to translate

    System.String sourceLanguage

    If not specified, german is taken as source language.

    System.Collections.Generic.List<System.String> targetLanguages

    Target languages

    Returns
    Type Description
    TranslationResultContract

    The translated texts.

    Examples

    POST http://YourServerName/InfoShare/Json/Common/GetTranslatedText

    Example for get translated texts.

    {
        "connectionId": "e90ce875-a784-4a24-924f-f4ba387521cf",
        "input": "Korsika",
        "sourceLanguage": "de",
        "targetLanguages": 
            [
                "en",
                "fr",
                "it"
            ]
    }

    Response:

    {
        "GetTranslatedTextResult": {
            "OriginalValue": "Korsika",
            "Translations": {
                "Values": [
                    {
                        "Culture": "en",
                        "Text": "Corsica"
                    },
                    {
                        "Culture": "fr",
                        "Text": "Corse"
                    },
                    {
                        "Culture": "it",
                        "Text": "Corsica"
                    }
                ]
            }
        }
    }
    Exceptions
    Type Condition
    ServiceException

    The connection id {connectionId} isn't valid or has expired (10008)

    ServiceException

    Missing feature in server license {featureId} (10100)

    ServiceException

    Translation service failed. Error code: {errorCode} Error message: {errorMessage} (10335)

    ServiceException

    No translation service endpoint configured (10331)

    Back to top Copyright © Kendox