Localizing text
Localizing text
This section shows you how to localize or customize strings in the Talk SDK UI.
Strings in the Talk SDK are localized into the languages listed in Supported languages below.
Customizing existing strings
The Talk SDK provides localizations for all the strings used throughout the UI. You can override them if required.
If your project does not yet have a Localizable.strings file with the different language variants, you can create one by following these steps:
-
In Xcode, select File > New > File, then select Resource in the iOS category in the sidebar.
-
Select Strings File from the files and click Next.
-
Name the file Localizable and click Create.
To customize the Talk SDK's strings with new values:
-
Choose the strings to customize and add them to the Localizable.strings file in your app as follows. Make sure to include placeholders in the replacements of any strings that contain them.
// add a key and change the value to what you want
"microphone_permission_screen_message" = "This app needs permission to use your microphone before you can start a call.";
-
Make sure that the file is in the Copy Bundle Resources section of the Build Phases tab in Xcode.
Adding a new localization
If the Talk SDK does not include localized strings for the language you are interested in, you can add new ones.
Select your Localizable.strings file, and in the right pane click Localize. When you select the missing language, a new variant of Localizable.strings will be created for it.
In the new file, add translations for all of the strings in the Talk SDK's Strings.bundle.
List of localized strings
"microphone_permission_screen_allow" = "Allow";
"microphone_permission_screen_cancel" = "Cancel";
"microphone_permission_screen_message" = "This app needs permission to use your microphone before you can start a call.";
"microphone_permission_screen_title" = "Allow microphone";
"microphone_permission_settings_alert_cancel" = "Cancel";
"microphone_permission_settings_alert_message" = "This app needs permission to use your microphone before you can start a call. Go to your app settings and allow access.";
"microphone_permission_settings_alert_settings" = "Settings";
"microphone_permission_settings_alert_title" = "Allow microphone";
"recording_consent_digital_line_or_agent_unavailable_error_cancel_button" = "Cancel";
"recording_consent_digital_line_or_agent_unavailable_error_message" = "Check your connection and try again.";
"recording_consent_digital_line_or_agent_unavailable_error_retry_button" = "Reconnect";
"recording_consent_digital_line_or_agent_unavailable_error_title" = "Couldn't connect to an agent";
"recording_consent_network_cancel_button" = "Cancel";
"recording_consent_network_error_message" = "Check your connection and try again.";
"recording_consent_network_error_title" = "Couldn't connect";
"recording_consent_network_retry_button" = "Reconnect";
"recording_consent_screen_cancel" = "Cancel";
"recording_consent_screen_consent_description" = "I consent to this call being recorded";
"recording_consent_screen_message" = "This call will be recorded for quality purposes.";
"recording_consent_screen_start_call" = "Start call";
"recording_consent_screen_title" = "Recording this call";
"call_screen_call_ended_title" = "Call ended";
"call_screen_call_failed_alert_message" = "Check your internet connection and try calling again.";
"call_screen_call_failed_alert_ok_button" = "OK";
"call_screen_call_failed_alert_title" = "Call failed";
"call_screen_call_failed_title" = "Call failed";
"call_screen_call_in_progress_title" = "Call in progress";
"call_screen_call_reconnecting_title" = "Reconnecting call...";
"call_screen_hang_up_button" = "Hang up";
"call_screen_mute_button" = "Mute";
"call_screen_speaker_button" = "Speaker";
"call_screen_starting_title" = "Starting call...";
Supported languages
Strings in the Talk SDK are localized into the following languages:
Language code | Language |
---|---|
ar | Arabic |
bg | Bulgarian |
cs | Czech |
da | Danish |
de | German |
el | Greek |
en-GB | British English |
en | American English |
es | Spanish |
fi | Finnish |
fil | Filipino |
fr | French |
fr-CA | French Canadian |
he | Hebrew |
hi | Hindi |
hu | Hungarian |
id | Indonesian |
it | Italian |
ja | Japanese |
ko | Korean |
ms | Malay |
nb | Norwegian |
nl | Dutch |
pl | Polish |
pt-BR | Brazilian Portuguese |
pt | Portuguese |
ro | Romanian |
ru | Russian |
sv | Swedish |
th | Thai |
tr | Turkish |
vi | Vietnamese |
zh-Hans | Simplified Chinese |
zh-Hant | Traditional Chinese |