Skip to main content
Version: Next

Localization

SDK supports Russian and English localizations by default.

To add support for a new language or change current translation:

  • Add your translation file to bundle (application/framework)
  • Specify it in ChatLocalizationConfig during SDK initialization

Configuration example:

// SDK initialization
let chatCenterSdk = ChatCenterUISDK(providerUid: "providerUid",
chatConfig: chatConfig,
loggerConfig: ChatLoggerConfig(logLevel: .all))

// Localization setup
chatCenterSdk.localizationConfig = ChatLocalizationConfig(bundle: Bundle.main, tableName: "CustomLocalizable")

Main Localization Keys

CategoryKeyDefault Value (EN)
Buttonsaction.title_okOK
action.title_yesYes
action.title_noNo
action.title_cancelCancel
action.title_repeatRetry
Chatchat.title.openedContact Center
chat.title.connectingConnecting...
chat.title.typingoperator is typing
Inputinput.placeholderMessage
Messagesmessage.deleted_textMessage deleted
message.status.not_deliveredNot delivered
Searchsearch.placeholder_titleSearch
search.not_found_titleNo results found
Errorserrors.connection_timeoutConnection timeout
errors.load_configFailed to load chat settings

For complete list of localization keys and their usage, refer to the Russian version of this documentation or demo application.

Custom Localization File Example

Create CustomLocalizable.strings file in your project:

// Buttons
"action.title_ok" = "OK";
"action.title_yes" = "Yes";
"action.title_no" = "No";
"action.title_cancel" = "Cancel";

// Chat
"chat.title.opened" = "Support Chat";
"chat.title.connecting" = "Connecting...";

// Input
"input.placeholder" = "Type your message...";

// Messages
"message.deleted_text" = "This message was deleted";

Then configure SDK to use it:

chatCenterSdk.localizationConfig = ChatLocalizationConfig(
bundle: Bundle.main,
tableName: "CustomLocalizable"
)