This is the developer guide for the Support SDK v1 for iOS. For Support SDK v2, see Support SDK v2 iOS.
This page shows you how to localize or customize strings in the UI we provide.
Before you start
Before you start, the following information is useful to know:
- The Support SDK comes localized into 19 languages out of the box. They are listed below.
- You can call
[ZDKLocalization printAllKeys](Objective-C) or
ZDKLocalization.printAllKeys()(Swift 3) to print a list of every key in ZendeskSDKStrings.bundle.
Check for existing localized strings
Strings in the Support SDK are already localized into the following languages:
Customize existing strings
If the Support SDK already includes localized strings for the language you are interested in, you can override the strings if required.
If your project does not yet have a Localizable.strings file with the different language variants, create it now. To do that:
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 then customize the Support SDK strings with new values:
Choose the strings to customize and add them to the
Localizable.stringsfile as follows:
// add a key and change the value to what you want "ios.ZDKHelpCenter.support.title" = "Your Custom String Value";
Make sure that the file is in the Copy Bundle Resources section of the Build Phases tab in Xcode.
Add a new localisation
If the Support 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 Support SDK's Strings.bundle.
Use a different strings file
If you would like to use a different strings file to the one provided with the Support SDK, you can easily change it.
Localizable.strings is the standard name for strings files. If you need to use a strings file named some-other-name.strings, add the file to your project and register some-other-name as follows.