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

  1. Supported languages
  2. Adding / changing localization
  3. Localized strings

Supported languages

By default, the SDK is shipped with the following languages:

  • English
  • French

Adding / changing localization

  1. Create a SASDisplayKit.strings file in your application project.
  2. Add this new file to your app’s target. This will add your string file to your application main bundle.
  3. 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.
  4. 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 the SASConfiguration 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

Back to top

Copyright Equativ © 2024. All right reserved.

Page last modified: Nov 13 2024.