Skip to main content

Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow, DB-CDC, Spark ETL, or Replication data flow that sends data to a Microsoft Text Translator location.
microsoft_text_translator_api.png

Microsoft Text Translator

Create a Microsoft Text Translator Destination

  1. Click the + icon on the Nexset that will be sent to the Microsoft Text Translator destination, and select the Send to Destination option from the menu.

  2. Select the Microsoft Text Translator connector from the list of available destination connectors. Then, select the credential that will be used to connect to your Microsoft Azure Translator service, and click Next; or, create a new Microsoft Text Translator credential for use in this flow.

  3. In Nexla, Microsoft Text Translator destinations can be created using pre-built endpoint templates, which expedite destination setup for common Microsoft Text Translator endpoints. Each template is designed specifically for the corresponding Microsoft Text Translator endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    Microsoft Text Translator destinations can also be configured manually, allowing you to send data to Microsoft Text Translator endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Microsoft Text Translator endpoints. Each template is designed specifically for the corresponding Microsoft Text Translator endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    Microsoft Text Translator - Make Translations

    This endpoint template translates text from a source language to a target language using the Microsoft Text Translator API. Use this template when you need to automatically translate text content from your data flow into different languages for multilingual applications, content localization, or global communication.

    • Enter the API version in the API Version field. This should be the version of the Microsoft Text Translator API you want to use (e.g., 3.0). The API version is included as a query parameter in the translation endpoint URL.
    • Enter the source language code in the Source language (From) field. This should be the language code of the text you want to translate (e.g., en for English, es for Spanish, fr for French). Use language codes in ISO 639-1 format. You can also use auto to let the API detect the source language automatically.
    • Enter the target language code in the Target language field. This should be the language code of the language you want to translate the text into (e.g., en for English, es for Spanish, fr for French). Use language codes in ISO 639-1 format. You can specify multiple target languages by separating them with commas (e.g., en,es,fr).

    This endpoint sends text data as JSON in the request body to translate text from the source language to the target language. The request body should contain an array of text objects with a Text property containing the text to translate. The endpoint returns translated text in the same structure, with translations provided for each target language specified.

    Language codes should be in ISO 639-1 format (e.g., en for English, es for Spanish, fr for French). You can use auto for the source language to enable automatic language detection. For detailed information about supported languages, language codes, API versions, and translation formats, see the Microsoft Translator Text API reference.

Configure Manually

Microsoft Text Translator destinations can be manually configured to send data to any valid Microsoft Text Translator API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

With manual configuration, you can also create more complex Microsoft Text Translator destinations, such as destinations that send data to multiple endpoints or destinations that require custom request headers or parameters.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Microsoft Text Translator API from the Method pulldown menu. Microsoft Text Translator API typically uses POST method for translation requests.

Data Format

  1. Select the format in which the Nexset data will be sent to the Microsoft Text Translator API from the Content Format pulldown menu. Microsoft Text Translator API expects JSON format for translation requests.

API Endpoint URL

  1. Enter the URL of the Microsoft Text Translator API endpoint to which data will be sent in the URL field. This should be the complete URL including the protocol (https://), the API base URL (api.cognitive.microsofttranslator.com), the endpoint path (/translate), and required query parameters (e.g., https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to=es). Include the api-version, from, and to query parameters in the URL.

Ensure the API endpoint URL is correct and includes all required query parameters (api-version, from, to). The Microsoft Text Translator API endpoint URL should point to the /translate endpoint. You can test the endpoint using the Test button after configuring the URL.

Request Body

  1. Configure the request body that will be sent to the Microsoft Text Translator API. The request body should contain an array of text objects with a Text property containing the text to translate, formatted as JSON. The request body format is typically [{"Text": "{message.text}"}] for single text translation, or you can use {message.json} to send the entire Nexset data as JSON.

The request body must be valid JSON and must match the Microsoft Text Translator API's expected format. The request body should contain an array of objects with a Text property. For detailed information about request body formats, supported languages, and translation options, see the Microsoft Translator Text API reference.

Save the Destination

  1. Once all of the relevant steps in the above sections have been completed, click the Next button to proceed with the rest of the data flow configuration, or click Save to save the destination configuration for later use.