---
schema_version: "1"
id: 2fbfd72e2788c112ee2fbba3c240d2c00f98a78682e6805823b8de968d5bebc4
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/ios-preferred-language.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-preferred-language.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b26abba52a7c8a8967c48c6746c395cadb068958372a44cc8f8bffe28f3cf046
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 iOS 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.

```swift
// Map a device language to a Salesforce language
let remoteLocaleMap = remoteLocaleMap = [
	"en-CA": "en",
	"fr-Fr": "fr",
	"es-CO": "es",
	"default": "en"
]

// Create a UIConfiguration object and set the remoteLocaleMap
let configuration = UIConfiguration(serviceAPI: <String>, organizationId: <String>, developerName: <name>, remoteLocaleMap: remoteLocaleMap, conversationId: <UUID>)
```
