Localize on iOS
The Equativ Display SDK provides a convenient way to add languages or modify the strings used when displaying the ads.
Table of contents
Supported languages
By default, the SDK is shipped with the following languages:
- English
- French
Adding / changing localization
- Create a
SASDisplayKit.strings
file in your application project. - Add this new file to your app’s target. This will add your string file to your application main bundle.
- Set the value of the strings for the languages you want to support. You can refer to the string keys table for description and identifier of each supported string.
-
Declare your app bundle to the SDK
You can instruct the SDK to use your app bundle in order to get the translation file using the
stringsBundle
property of theSASConfiguration
shared instance.By default the SASDisplayKit.framework bundle will be used to retrieve the translation file.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // ... // The SDK will uses the strings available in the app bundle instead of the strings embedded in the SDK SASConfiguration.shared.stringsBundle = Bundle.main // ... }
Localized strings
Here is the exhaustive list of the keys used to localized strings in the SASDisplayKit.strings
resource file:
Key | Description |
---|---|
Native video player interface | |
sasdisplaykit.strings.ui.nativevideo.replay_button_label |
‘Replay’ button label |
sasdisplaykit.strings.ui.nativevideo.more_info_button_label |
‘More Info’ button label |