Real-time Translation

Build intelligent, multilingual services for applications with OCI Language Real-time Translation.

Real-time translation enables efficient and accurate source-to-target text translation in real-time across all supported languages using our Machine Translation service. Text can be plain text or HTML. HTML tags aren't be translated. Only text appearing between the tags is translated.

Use Cases

  • Translate customer support interactions through social messaging apps, email or support tickets, and live chat in real time into support engineers' preferred language.
  • Creating multi-lingual live applications such as chatbots can be a challenge. Instead, developers can use Language Detect to detect the query language and perform automatic translations to and from the chatbot's original language
  • Online advertising companies crawl millions of web pages to analyze the content surrounding the ads and ensure brand safety. Brand safety helps advertisers host their ads in the correct place for the target audience. Typically, ad companies crawl web pages in regional languages. Before classifying the text, advertisers can translate the content to English and combine it with text classification.

Preventing Text Translation

To prevent translation, tag content using the following methods:

  • Using <span translate="no">
    BODY
    [  
        "En français, ils appellent le musée du Louvre <span class=\"notranslate\">le musée du Louvre</span>",
        "En français, ils appellent le musée du Louvre <span>le musée du Louvre</span>",
        "En français, ils appellent le musée du Louvre <div class=\"notranslate\">le musée du Louvre</div>",
        "En français, ils appellent le musée du Louvre <div>le musée du Louvre</div>"
    ]
     
    Result:
    [
        "In French, they call the Louvre Museum <span class=\"notranslate\">le musée du Louvre</span>",
        "In French they call the Louvre Museum <span>the Louvre Museum</span>",
        "In French, they call the Louvre Museum <div class=\"notranslate\">le musée du Louvre</div>",
        "In French they call the Louvre Museum <div>the Louvre Museum</div>"
    
    ]
  • Using <span class="notranslate">
    BODY
    [  
        "En français, ils appellent le musée du Louvre <span class=\"notranslate\">le musée du Louvre</span>",
        "En français, ils appellent le musée du Louvre <span>le musée du Louvre</span>",
        "En français, ils appellent le musée du Louvre <div class=\"notranslate\">le musée du Louvre</div>",
        "En français, ils appellent le musée du Louvre <div>le musée du Louvre</div>"
    ]
     
    Result:
    [
        "In French, they call the Louvre Museum <span class=\"notranslate\">le musée du Louvre</span>",
        "In French they call the Louvre Museum <span>the Louvre Museum</span>",
        "In French, they call the Louvre Museum <div class=\"notranslate\">le musée du Louvre</div>",
        "In French they call the Louvre Museum <div>the Louvre Museum</div>"
    ]

Customizing Translation - Inline Dictionary

With the inline dictionary feature you can customize translations for specific terms or phrases. If you already know the translation you want to apply to a word or a phrase, you can supply it as markup within the request.

The inline dictionary feature is safe only for compound nouns such as proper names and product names, and we recommend you use this feature sparingly.

<oratrans:dictionary translation="Bonjour">Hello</oratrans:dictionary>

Running Real-time Translation

Run real-time translation using the Language service.

    1. Open the navigation menu and click Analytics & AI. Under AI Services, click Language.
    2. In the left-side navigation menu, click Text translation.
    3. Select the Source language and Target language languages.
    4. Paste or enter text into the Source language text box.
    5. Click Translate.

      The results are displayed in the target dialog box. Use Reset to start a new translation.

      Tip

      Use Copy to copy the translated text to the clipboard to use elsewhere.
  • Use the oci ai language batch-language-translation command and required parameters to translate one or more files:

    oci ai language batch-language-translation --documents [<list-of-documents>] ... [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the BatchLanguageTranslation operation to translate text.