Desk SDKs Android v1
Desk SDKs Android
Desk SDKs
Android
Version 1

Translation

Copy link

Sendbird Desk supports translation for messages in tickets. This feature allows agents to translate messages into different languages, making it easier to communicate with customers who speak different languages than their own.

Once enabled, agents can translate the following messages:

  • Customer messages into the agent's preferred language
  • Agent messages into the customer's preferred language

You can turn this feature on and off under Settings > Desk > AI features > Translation in Sendbird Dashboard.


How to configure language preference

Copy link

To use this feature, both the customer's and agent's language preferences must be set in advance.

RoleHow to set the language preference

Agent

Agent's profile in Sendbird Dashboard.

Customer

Desk SDK, Desk Platform API, or Sendbird Dashboard.

In the SDK, this can be done either:

  • During authentication
  • By calling the setCustomerLanguage() method after authentication

Note: This feature is supported for Sendbird Desk SDK Android v1.1.7 or higher.

Once the customer's language is set, it becomes the default language for the user within Sendbird Desk and all agent messages will be translated into the set language. The following snippets demonstrate how to set and update a customer's language preference in Desk SDK for Android.

Case 1: During authentication

Copy link

Specify or pass the language parameter in the authenticate() method. This sets the user profile with the desired language code, enabling message translation accordingly.

Note: Specify the language in IETF BCP 47 format, like en and ja. Refer to the list of supported languages at the bottom of this page.

SendBirdDesk.authenticate(
    userId = "USER_ID",
    accessToken = "ACCESS_TOKEN",
    language = "en", // Use a language code in IETF BCP 47 format.
    handler = object : SendBirdDesk.AuthenticateHandler {
        override fun onResult(e: SendbirdException?) {
            if (e == null) {
                // Successfully authenticated with language preference.
            } else {
                // Handle authentication error.
            }
        }
    }
)

Case 2: Calling setCustomerLanguage() after authentication

Copy link

To allow users to update their language preference, use setCustomerLanguage(). This updates the user's language settings and ensures the agent's messages are translated into the language last selected by the user without re-authentication.

Note: Specify the language in IETF BCP 47 format, like en and ja. Refer to the list of supported languages at the bottom of this page.

SendBirdDesk.setCustomerLanguage(
    language = "en",
    handler = object : SendBirdDesk.SetCustomerLanguageHandler {
        override fun onResult(e: SendbirdException?) {
            if (e == null) {
                // Language successfully updated.
            } else {
                // Handle error.
            }
        }
    }
)

How translated messages are displayed

Copy link

For readability and clarity, the visibility of original and translated messages differs between agents and customers:

  • Agents: can see both original and translated messages for customer messages, as well as their own messages.
  • Customers: can only see the translated messages sent by agents.


Supported languages

Copy link

The following list shows the language codes supported by Sendbird Desk at this moment.

AVAILABLE_TRANSLATION_LANGUAGE_SET = (
    "ar",     # Arabic
    "az",     # Azerbaijani
    "cs",     # Czech
    "da",     # Danish
    "de",     # German
    "el",     # Greek
    "en",     # English
    "es",     # Spanish
    "fi",     # Finnish
    "fil",    # Filipino
    "fr",     # French
    "he",     # Hebrew
    "hi",     # Hindi
    "hr",     # Croatian
    "hu",     # Hungarian
    "id",     # Indonesian
    "it",     # Italian
    "ja",     # Japanese
    "ko",     # Korean
    "ms",     # Malay
    "nb",     # Norwegian Bokmål
    "nl",     # Dutch
    "pl",     # Polish
    "pt",     # Portuguese
    "ro",     # Romanian
    "ru",     # Russian
    "sv",     # Swedish
    "th",     # Thai
    "tr",     # Turkish
    "uk",     # Ukrainian
    "vi",     # Vietnamese
    "zh-cn",  # Chinese (Simplified)
    "zh-tw",  # Chinese (Traditional)
)