Locale
Configure locale behavior and override the default locale that Airship uses.
The Airship SDK is localized in 48 different languages for all strings included within the SDK. The strings within the app will automatically use the device’s or app’s configured LocaleThe combination of a language and country. A user’s locale is determined by their device settings..
Airship uses the user’s locale 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 for messaging.
Overriding the locale
You can override the locale programmatically at runtime, which takes precedence over the device’s locale settings.
await Airship.locale.setLocaleOverride("de")Clearing the locale override
To remove a locale override and return to using the device’s locale:
await Airship.locale.clearLocaleOverride()Getting the current locale
To retrieve the locale that Airship is currently using:
const locale = await Airship.locale.getLocale()Categories