Localize on Android
The Smart Display SDK provides a convenient way to add languages or change the strings used by the ad player on supported languages.
Supported languages
By default, the SDK is shipped with the following languages:
- English
- French
Adding / changing localization
The Smart Display SDK relies on the localization mecanism provided by Android platform, using xml files located in the /res
folder of the AAR library file.
To change the existing strings or to add new languages, you need to:
-
Create a
string_smartadserver.xml
file containing all keys listed in the new section with their value in the language you want to add/modify. -
In your application project, add this new file to the resource folder corresponding to the desired language.
For instance, if you want to change french strings, you will add the
string_smartadserver.xml
to the/res/value_fr
.
Please refer to Android plaftorm documentation for further information about normalized folder names for all languages
All strings defined in XML files of your application will override Smart Display SDK strings defined in a file of the same name
Localized strings
Here is the XML content containing all keys/values used to localized the Smart Display SDK in english.
Those values are the labels of the native video player interface used to display video ads.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="sas_native_video_close_button_label">CLOSE</string>
<string name="sas_native_video_replay_button_label">REPLAY</string>
<string name="sas_native_video_more_info_button_label">LEARN MORE</string>
<string name="sas_native_video_download_button_label">INSTALL NOW</string>
<string name="sas_native_video_watch_button_label">WATCH MORE</string>
</resources>