Localization

You can override the user’s default locale to utilize localization for a specific language.

The Airship SDK provides localization for interactive notification buttons and the Message Center for the following languages: English, Chinese (Traditional), Chinese (Simplified), German, Hungarian, Slovak, Russian, Portuguese (Portugal), Portuguese (Brazil), French, Danish, Turkish, Norwegian, Romanian, Polish, Finnish, Dutch, Hindi, Spanish (Latin American), Spanish (Spain), Hebrew, Czech, Italian, Vietnamese, Thai, Japanese, Arabic, Korean, Malay, Indonesian, and Swedish.

Overriding locale

Airship uses the user’s LocaleThe combination of a language and country. A user’s locale is determined by their device settings. for various locale-sensitive tasks, including selecting the language for messages and reporting for analytics. Apps can override the locale so that Airship uses a different locale than the device’s current locale. Note: Airship UI localization uses the device’s current locale, so it is not affected by the override.

Overriding the locale
UAirship.shared().locale.currentLocale = Locale(identifier:"de")
[UAirship shared].locale.currentLocale = [NSLocale localeWithLocaleIdentifier:@"de"];
Clearing the locale override
UAirship.shared().locale.clearLocale()
[[UAirship shared].locale clearLocale];
Getting the locale currently used by Airship
let airshipLocale = UAirship.shared().locale.currentLocale
NSLocale *airshipLocale = [UAirship shared].locale.currentLocale;