as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
The I18NManager API provides functionality that allows you work with to Locale and Timezone settings.

I18NManager example

The following example demonstrates the ability to set timezone and locale values, as well as to setup listeners to be able to update when those values are changed at any time.

I18NManager methods

getAppLocale

Gets the app’s locale setting. If the app’s locale is not set, the system locale is returned.

setAppLocale

Sets the app’s locale.

getSystemLocale

Gets the system’s locale setting.

resetLocale

Resets the app locale back to the system locale.

getTimezone

Gets the app’s timezone setting. If the app’s timezone is not set, the system timezone is returned.

setTimezone

Sets the apps’s timezone. Parameters:

getSystemTimezone

Gets the system’s timezone setting.

resetTimezone

Resets the App timezone back to the system timezone.

addListener

Adds a listener for locale or timezone change. Listener id triggered when another app changes the locale or timezone. Parameters: eventName This can be any of the following values:
  • I18nManager.SettingEventName.Locale
  • I18nManager.SettingEventName.Timezone

removeListeners()

Removes all added event listeners from the I18NManager object.

Additional resources

Internationalization and Localization
最后修改于 2026年10月26日