---
schema_version: "1"
id: a0e55a5e92d59f161e7178c445900a6f76b3e54c9bbbdaa83734211ccf0e54c7
title: Preferred Language of Messaging Users
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-in-app/guides/android-preferred-language.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-preferred-language.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: db71135a148041c4608d439bf78db3216035fecf64b0cc4d7b67a85ad9f6fd28
products:
  - Enhanced In-App Chat
  - Service Cloud Developer Content
---
# Preferred Language of Messaging Users

The Enhanced In-App Chat SDK automatically sends the device’s preferred language to the org, which will allow localized [Messaging Components](https://help.salesforce.com/s/articleView?id=service.messaging_components_parent.htm) to be sent back to the SDK. For this to work, the **Identify preferred language of messaging users** option on the Messaging Settings page in Setup must be selected. For more information about translating messaging components, see [Translate Messaging Components into Your Customer’s Language](https://help.salesforce.com/s/articleView?id=service.messaging_components_translate.htm).

**important:** This feature requires version 1.9.0 or later of the Messaging for In-App SDK.

This article applies to the following implementations:

| UI SDK | Core SDK |
| :----: | :------: |
|   ✅   |          |


The SDK will automatically pass the language locale of the device to the agent on session creation. For clarification on the difference between a session and a conversation see the [Message Glossary](https://help.salesforce.com/s/articleView?id=service.miaw_glossary.htm).

The list of [Supported Languages](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm) on the org depends on the level of language support configured on the org. The list of supported languages on the Android platform is much larger. If a language and locale pair that are sent to the service is unrecognized, the translated messaging component won’t be shown in the desired language and you won’t be notified of the failure. The SDK provides a public API [remoteLocaleMap](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm) on the [CoreConfiguration](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/configuration) object to allow the language locale to be mapped from the mobile device value to a supported Salesforce language locale.

**note:** We highly recommend that you use the remoteLocaleMap API; otherwise, the feature may not work.

```kotlin
// Map a device language to a Salesforce language
val remoteLocaleMap = mapOf(
	"en-CA" to "en",
	"fr-Fr" to "fr",
	"es-CO" to "es",
	"default" to "en"
)

// Create a UIConfiguration object and set the remoteLocaleMap
val uiConfiguration = UIConfiguration(
	serviceAPI = "<serviceAPI>",
	organizationId = "<orgId>",
	developerName = "<developerName>",
	conversationId = UUID.randomUUID(),
	remoteLocaleMap = remoteLocaleMap
)
```
