The chat language translation feature makes it easy for chat agents to communicate with customers who speak a different language. Starting in the 24C release, administrators can configure the chat language translation feature so that a third-party service provides the language translation. For example, Oracle OCI language translation, Language I/O, Google translation, Azure translation APIs or any REST API translation service provider can be used to serve agents the real-time chat translations. For more information on how to enable and configure this feature, check out Answer 12842: Requirements to configure Language Translation for Chat in the Browser User Interface.
This article provides high-level information about the configurations required in below specified modules:
- External Object integration
- Chat Translation Configuration
It also includes help on the sample code required for the extensibility actions.
External Object Integration:
First, configure the language detect and the translate API within the External Objects Integration (documentation). Add separate connections for the detect and translate API endpoints of the translation provider in the External Object Integration as shown below:
Next, test the connection to ensure the detect and translation APIs are giving the expected responses. For example, test the Language I/O detect and translate connections by setting the payload in the Request Body field and doing a POST request as shown in above images.
Now that you have created the external object integration so that your preferred language translation provider can detect the language and provide the language translation, you can configure the Language Translation feature for chat.
Chat Translation Configuration:
To configure the feature within the Administration page of the Browser UI:
- Log into the Browser UI
- Go to the Administration page (menu in the upper left corner)
- Go to “Chat Configuration”
- Go to “Chat Translations”
- Click the “Add New” button
- Create a new Chat Translation Configuration with below details:
- Name: Any meaningful name for the connection.
- Language Detection Connection: Select the Language Detect Connection previously created in external objects integration page.
- Enable Confidence Score: A toggle switch that enables and disables the confidence score field. The Confidence Score is the threshold of confidence by which the detected language is selected. If we do not want to set a threshold value for detection score from the translation provider API, this can be disabled.
- Confidence Score: Any Language service provides a confidence score to indicate the reliability of the language detection. This score ranges from 0 to 1, with higher values indicating greater confidence in the language detection. The default value for this field is 0.75 (75% confidence). Administrator can set the value of this field between 0.00 to 1.00. If the confidence score for a detected language is less than the configured value, then that detected language is ignored until the confidence score for the detected language is equal to or greater than the configured value.
- Language Translation Connection: Select the Language Translation Connection previously created in external objects integration page.
- Translate Off The Record Messages: A toggle switch that enables and disables the translation for Off the Record messages. If this field is enabled (switch toggled to the right), “Off the Record” data is sent to the translation provider and agents see “Off the Record” messages in the translated state.
- Enable Translation By Default: A toggle switch that determines whether the language translation feature is enabled or disabled for agents that handle chat in the Browser UI. If this option is enabled (switch toggled to the right), then the language translation feature is automatically enabled for chat agents. If this option is disabled (switch toggled to the left), then the language translation feature is disabled for chat agents. And agents have the flexibility to turn on real-time translation during live chats whenever it’s needed. Engagement Panel v19+ is required, please contact <Jessica Bradley jessica.bradley@oracle.com> to have your site updated. The default setting for this feature is enabled (toggled to the right). This feature is available in the BUI OCT I release, available on non-production sites September 19, 2025 and on production sites October 03, 2025.
- Notes: Any meaningful Note for the translation connection.
- Use the shuffle control to specify which profiles have the feature enabled, as shown below:
Second, go to the Customizations tab and provide a function name for “Convert Request Extensibility Action” and “Convert Response Extensibility Action”, as shown in the below image:
- The “Convert Request Extensibility Action” function transforms the request parameter into the format which is expected by the translation endpoint configured in External Object Integrations
- The “Convert Response Extensibility Action” function extracts the response from translation endpoint and transforms into the expected format
These functions must be implemented in the extensibility code. The interface types for the parameters are defined in Interfaces:
- ILanguageTranslationRequest: input parameter to Convert Request Extensibility Action
- ILanguageTranslationTransformedRequest: output of Convert Request Extensibility Action
- ILanguageTranslationResponse: input parameter to Convert Response Extensibility Action
ILanguageDetectionTransformedResponse - ILanguageTranslationTransformedResponse: output of Convert Response Extensibility Action
Now that you have created the language detection and translation component, and defined the extensibility actions for convert requests and responses, you can implement these new functions.
Sample code for Extensibility actions:
Convert Request Extensibility Action: Implement the function that is specified in “Convert Request Extensibility Action” in the Chat Translation configuration. In this example the function specified was “convertRequest”:
///<reference path="./osvcExtension.d.ts"/>
public convertRequest(param: ILanguageTranslationRequest): ILanguageTranslationTransformedRequest {
let transformedRequest: ILanguageTranslationTransformedRequest;
if (param.translationType === 'TRANSLATION') {
transformedRequest = {
// expected format of the Translation API
payload: {
"q": param.text,
"target": param.targetLanguageCode
}
}
} else if (param.translationType === 'DETECT_LANGUAGE') {
// expected format of the Detect API
transformedRequest = {
payload: {
"q": param.text
}
}
}
return transformedRequest;
}
Convert Response Extensibility Action: Implement the function that is specified in “Convert Response Extensibility Action” in the Chat Translation configuration. In this example the function specified was “convertResponse”:
//Define a languageCodeMap which returns the name of the detected language.
///<reference path="./osvcExtension.d.ts"/>
const languageCodeMap = {
'ar': 'Arabic',
'zh-CN': 'Chinese(Simplified)',
'zh-TW': 'Chinese(Traditional)',
'cs': 'Czech',
'da': 'Danish',
'nl': 'Dutch',
'en': 'English',
'fi': 'Finnish',
'fr': 'French',
'de': 'German',
'el': 'Greek',
'hu': 'Hungarian',
'it': 'Italian',
'ja': 'Japanese',
'ko': 'Korean',
'nb-NO': 'Norwegian(Bokmål)',
'pl': 'Polish',
'pt': 'Portuguese',
'pt-BR': 'Portuguese(Brazil)',
'ro': 'Romanian',
'ru': 'Russian',
'es': 'Spanish',
'sv': 'Swedish'
}
public convertResponse(param: ILanguageTranslationResponse): ILanguageDetectionTransformedResponse | ILanguageTranslationTransformedResponse {
let transformedResponse: ILanguageDetectionTransformedResponse | ILanguageTranslationTransformedResponse;
if (param.translationType === 'TRANSLATION') {
transformedResponse = {
translatedText: param.payload?.data?.translations[0].translatedText
}
} else if (param.translationType === 'DETECT_LANGUAGE') {
const languageCode = param?.payload?.data?.detections[0][0].language;
const languageScore = param?.payload?.data?.detections[0][0].confidence;
const languageLabel = languageCodeMap[languageCode];
let languages: IDetectedLanguage[] = [{
code: languageCode,
name: languageLabel,
score: languageScore
}]
transformedResponse = {
languages: languages
}
}
return transformedResponse;
}
Register Extensibility Action: Register the action name and invoke the code below, so that the action can execute the callback function (BUI Extensibility Documentation):
class SampleExtensionClass {
public async initialize(): Promise<void> {
const extensionProvider: IExtensionProvider = await ORACLE_SERVICE_CLOUD.extension_loader.load("CUSTOM_APP_ID", "1");
const globalContext: IExtensionGlobalContext = await extensionProvider.getGlobalContext();
//register the functions defined for converting request and response as defined in Chat Translation Customization Configuration image
globalContext.registerAction('convertRequest', this.convertRequest.bind(this));
globalContext.registerAction('convertResponse', this.convertResponse.bind(this));
}
.....
// add convert request and add convert response functions defined in above code snippets
.....
}
(async () => {
return await new SampleExtensionClass().initialize();
})()
Now that you have implemented the proper functions and registered the related actions, you can test the Language Translation feature within Chat. Testing is critical to ensure the third-party service is providing translations during the real time chat session.
In the next blog of the series, the “Logging Extensibility Action” will be covered which will explain the usage of translation log in extensibility.
