Text Translation

Translate input text into one of the Language service-supported target languages.

Supported Languages

Language Language Code
Arabic ar
Croatian hr
Czech cs
Danish da
Dutch nl
English en
Finnish fi
French fr
French Canadian fr-CA
German de
Greek el
Hebrew he
Hungarian hu
Italian it
Japanese ja
Korean ko
Norwegian no
Polish pl
Portuguese pt
Portuguese Brazilian pt-BR
Romanian ro
Russian ru
Simplified Chinese zh-CN
Slovak sk
Slovenian sl
Spanish es
Swedish sv
Thai th
Traditional Chinese zh-TW
Turkish tr
Vietnamese vi

Use Cases

Multilingual chatbots

The purpose of chatbots is to answer customer queries. Chatbots can detect the query language and answer the question in the same language.

Developers that create the bots might not speak or can program the chatbots in a dozen languages. Instead, developers can use Language to detect the query language and perform automatic translations to and from the chatbot's original language.

Online advertisements

Online advertising companies crawl millions of web pages to analyze the content surrounding the ads and ensuring brand safety. Brand safety helps advertisers host their ads in the right place for the right kind of audience. For example, brand safety suggests avoiding pizza ads in weight loss articles.

Typically, ad companies crawl web pages that are in regional languages. Before classifying the text, advertisers often translate the content to English. Language provides near real-time translation combined with text classification allowing advertising companies to create a single language classification model.

Document search

Companies operating in different industries have tons of documents such as request for proposals (RFPs), product documentation, services, and purchase agreements. These documents are often stored in document databases, which require keywords for indexing and to speed up search and retrieval.

To enable document search even when a query is in a different language, businesses can use Language to translate the query into the set core popular languages, whenever few results are in the original language.

Examples

English Source Text French Target Text
Red Bull Racing Honda, the four-time Formula-1 World Champion team, has chosen Oracle Cloud Infrastructure (OCI) as their infrastructure partner. Red Bull Racing Honda, l'équipe quatre fois championne du monde de Formule 1, a choisi Oracle Cloud Infrastructure (OCI) comme partenaire d'infrastructure.
OCI recently added new services to the existing compliance program including SOC, HIPAA, and ISO, to enable our customers to solve their use cases. We also released new technical papers and guidance documents related to Object Storage, the Australian Prudential Regulation Authority (APRA), and the Central Bank of Brazil. These resources help regulated customers better understand how OCI supports their regional and industry-specific compliance requirements. Not only are we expanding our number of compliance offerings and regulatory alignments, we continue to add regions and services at a faster rate. OCI a récemment ajouté de nouveaux services au programme de conformité existant, notamment SOC, HIPAA et ISO, pour permettre à nos clients de résoudre leurs cas d'utilisation. Nous avons également publié de nouveaux documents techniques et documents d'orientation concernant Object Storage, l'Australian Prudential Regulation Authority (APRA) et la Banque centrale du Brésil. Ces ressources aident les clients réglementés à mieux comprendre comment OCI prend en charge leurs exigences de conformité régionales et sectorielles. Non seulement nous développons notre nombre d'offres de conformité et d'alignements réglementaires, mais nous continuons à ajouter des régions et des services plus rapidement.

Preventing Translation of Content

The translation engines allow you to tag content so that it isn't translated. For example, you might want to tag code, a brand name, or a word/phrase that doesn't make sense when localized. To prevent translation of content, complete the following:

  1. Tag the content with no translate. For example:
    POST /api/translate/fr/en
    [  
        "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>"
    ]
  2. Tag content with translate="no". For example:
    POST /api/translate/fr/en
    [  
        "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>"
    ]

Inline dictionary

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. We recommend you use this feature sparingly.

It's by design that the inline dictionary only works with format set to html.

Syntax:

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

For example:

POST /api/translate/en/fr
[
    "You can use <oratrans:dictionary translation=\"The Cool Text App\">cool text application</oratrans:dictionary> to create some cool text",
    "You can use cool text application to create some cool text"
]
 
Result:
[
    "Vous pouvez utiliser The Cool Text App pour créer du texte cool",
    "Vous pouvez utiliser l'application de texte cool pour créer du texte cool"
]

Known Issues and Limitations

Oracle Translate provides good quality and reliable translation for a wide range of business enterprise and generic content. Translated text can be utilized without further modification if some imperfections are tolerated. In cases where precision is essential, post-editing by native language speakers can be commissioned to rectify and enhance machine translation output.

To enhance the quality of your translations, consider these potential limitations and adopt the recommendations listed below:

Limitation Recommendation

Quality of source content: This can impact the quality of the translation. The key areas to consider that may reduce translation quality are:

  • Source containing abbreviations, misspellings, or lack of punctuation
  • Long strings (>20 words) and very short strings (1-word or 2-word strings)
Check the source content for spelling mistakes, punctuation errors and string length.
Context- and Domain-specific terminology or Named Entities: If your content contains specific terminology or named entities (person names, company names, brand names), our generic translation model may not translate this content to meet the needs of your use case.

We recommend using our glossary feature to control your translation and consistently translate terms that are specific to your use case.

Note

Oracle Brand protection is in place to ensure registered Oracle terms such as product names aren't translated. This is expected behaviour and is based on the Oracle Official Names List.
    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]

    Example:

    oci ai language batch-language-translation --documents '[{"key": "1","languageCode": "en","text": "hello world"}]' 
    --target-language-code es

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

  • Run the BatchLanguageTranslation operation to translate one or more files.