@amazon-devices/react-native-localize is a library for using Localize React Native in React Native for Vega (RNK) apps. The library provides localization and internationalization support, allowing you to adapt your app to different languages, regions, and cultures.
Installation
To use the package, add the JavaScript library dependency in your app’spackage.json as shown in the following example.
Examples
Here’s an example of how to use@amazon-devices/react-native-localize.
API reference
getLocales()
Returns the user’s preferred locales, in order.Method type
Example
getNumberFormatSettings()
Returns number formatting settings.Method type
Example
getCurrencies()
Returns the user’s preferred currency codes, in order.Method type
Example
getCountry()
Returns the user’s current country code based on its device locale, not on its position.Method type
Example
Latin American regions
Devices using Latin American regional settings return “UN” instead of “419”, because “419” is not a standard country code.getCalendar()
Returns the user’s preferred calendar format.Method type
Example
getTemperatureUnit()
Returns the user’s preferred temperature unit.Method type
Example
getTimeZone()
Returns the user’s preferred timezone based on its device settings, not on its position.Method type
Example
uses24HourClock()
Returnstrue if the user prefers a 24 hour clock format, false if the user prefers a 12 hour clock format.
Method type
Example
usesMetricSystem()
Returnstrue if the user prefers the metric measurement system, false if the user prefers imperial.
Method type
Example
usesAutoDateAndTime()
Tells if the device enables the automatic date and time setting.Method type
Example
usesAutoTimeZone()
Tells if the device enables the automatic time zone setting.Method type
Example
Supported versions
Related topics
- Supported Third-Party Libraries and Services
- react-native-device-info — To retrieve device and app information such as OS version, device model, app version, and bundle ID, use the
react-native-device-infopackage alongsidereact-native-localize.

