Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

expo-localization

expo986.7kMIT16.0.1TypeScript support: included

Provides an interface for native user localization information.

react-native, expo, localization, locales, l10n

readme

expo sdk

Expo

Expo SDK version Chat or ask a question License: MIT Downloads

Try Expo in the Browser  •  Read the Documentation  •  Learn more on our blog  •  Request a feature

Follow us on

Expo on X   Expo on GitHub   Expo on Reddit   Expo on LinkedIn   Expo on LinkedIn

Introduction

Expo is an open-source platform for making universal native apps that run on Android, iOS, and the web. It includes a universal runtime and libraries that let you build native apps by writing React and JavaScript.

This repository includes the Expo SDK, Modules API, Go app, CLI, Router, documentation, and various other supporting tools. Expo Application Services (EAS) is a platform of hosted services that are deeply integrated with Expo open source tools. EAS helps you build, ship, and iterate on your app as an individual or a team.

Read the Expo Community Guidelines before interacting in the repository. Thank you for helping keep the Expo community open and welcoming!

Table of contents

📚 Documentation

Learn about building and deploying universal apps in our official docs!

🗺 Project Layout

  • packages All the source code for Expo modules, if you want to edit a library or just see how it works this is where you'll find it.
  • apps This is where you can find Expo projects which are linked to the development modules. You'll do most of your testing in here.
  • apps/expo-go This is where you can find the source code for Expo Go.
  • apps/expo-go/ios/Exponent.xcworkspace is the Xcode workspace. When developing iOS, always open this instead of Exponent.xcodeproj because the workspace also loads the CocoaPods dependencies.
  • docs The source code for https://docs.expo.dev
  • templates The template projects you get when you run npx create-expo-app
  • react-native-lab This is our fork of react-native used to build Expo Go.
  • guides In-depth tutorials for advanced topics like contributing to the client.
  • tools contain build and configuration tools.
  • template-files contains templates for files that require private keys. They are populated using the keys in template-files/keys.json.
  • template-files/ios/dependencies.json specifies the CocoaPods dependencies of the app.

🏅 Badges

Let everyone know your app can be run instantly in the Expo Go app!

runs with Expo Go

runs with Expo Go

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-000.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-4630EB.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

👏 Contributing

If you like Expo and want to help make it better then check out our contributing guide! Check out the CLI package to work on the Expo CLI.

❓ FAQ

If you have questions about Expo and want answers, then check out our Frequently Asked Questions!

If you still have questions you can ask them on our Discord and Forums or X @expo.

💙 The Team

Curious about who makes Expo? Here are our team members!

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.

Star the Expo repo on GitHub to support the project

changelog

Changelog

Unpublished

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

💡 Others

16.0.1 — 2025-01-10

This version does not introduce any user-facing changes.

16.0.0 — 2024-10-22

🛠 Breaking changes

🐛 Bug fixes

  • Fix invalid regionCode response on iOS. (#32081 by @aleqsio)
  • Add missing react peer dependencies for isolated modules. (#30474 by @byCedric)
  • Only import from expo/config to follow proper dependency chains. (#30501 by @byCedric)
  • Only import from expo/config-plugins to follow proper dependency chains. (#30499 by @byCedric)

💡 Others

  • Removed redundant usage of EventEmitter instance. (#28946 by @tsapeta)

15.0.3 — 2024-05-06

🎉 New features

  • Added a forcesRTL manifest flag for forcing RTL to be on. (#28129 by @aleqsio)

15.0.2 — 2024-05-01

This version does not introduce any user-facing changes.

15.0.1 — 2024-04-23

This version does not introduce any user-facing changes.

15.0.0 — 2024-04-18

🐛 Bug fixes

  • [iOS] Add privacy manifest describing required reason API usage. (#27770 by @aleqsio)
  • [Android] Fix es-419 locale returning empty list. (#27250 by @aleqsio)
  • [Web] Gracefully handle unsupported language tags. (#27403 by @mary-ext)

💡 Others

  • Removed deprecated backward compatible Gradle settings. (#28083 by @kudo)

14.8.3 - 2024-01-18

This version does not introduce any user-facing changes.

14.8.2 - 2024-01-10

This version does not introduce any user-facing changes.

14.8.1 - 2023-12-19

This version does not introduce any user-facing changes.

14.8.0 — 2023-12-12

This version does not introduce any user-facing changes.

14.7.0 — 2023-11-14

🛠 Breaking changes

🐛 Bug fixes

💡 Others

  • [iOS] Use newer, non-deprecated platform APIs in getLocales(). (#24884 by @aleqsio)

⚠️ Notices

14.6.0 — 2023-10-17

🛠 Breaking changes

🐛 Bug fixes

14.5.0 — 2023-09-04

🎉 New features

  • Added support for React Native 0.73. (#24018 by @kudo)
  • Added a temperatureUnit field, which contains the default temperature unit for the locale. (#24059 by @behenate)

💡 Others

  • Change documentation to refer to a correct replacement method in a deprecated field. (#23811 by @aleqsio)

14.4.0 — 2023-08-02

This version does not introduce any user-facing changes.

14.3.0 — 2023-06-21

🎉 New features

  • Changing locale on Android no longer reloads the app if the expo-localization config plugin is added to app.json. (#22763 by @aleqsio)
  • Added hooks to get current locale and calendar. (#22763 by @aleqsio)
  • Measurement system now returns uk and us values on iOS 16 and higher. (#22763 by @aleqsio)

🐛 Bug fixes

  • User settings for delimiters and other locale preferences now override default locale settings for each locale in the list. (#22763 by @aleqsio)
  • Fixed Android build warnings for Gradle version 8. (#22537, #22609 by @kudo)

14.2.0 — 2023-05-08

🐛 Bug fixes

  • Fixed invalid timezone returned for getCalendars on Web. (#22003 by @aleqsio)
  • Fixed errors thrown on Play Console pre-launch report. (#22003 by @aleqsio)

14.1.1 — 2023-02-09

This version does not introduce any user-facing changes.

14.1.0 — 2023-02-03

💡 Others

  • On Android bump compileSdkVersion and targetSdkVersion to 33. (#20721 by @lukmccall)

14.0.0 — 2022-10-25

🛠 Breaking changes

  • Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. (#18873 by @tsapeta)

🎉 New features

  • Added two new synchronous functions: getLocales and getCalendars. (#19019 by @aleqsio)
  • Added a supportsRTL manifest flag for enabling RTL on suitable locales. (#19634 by @aleqsio)

🐛 Bug fixes

  • Fixed build error for setting compileSdkVersion to 33. (#19518 by @kudo)

⚠️ Notices

  • Deprecated existing constants API while keeping backwards compatibility. (#19019 by @aleqsio)

13.1.0 — 2022-07-07

🎉 New features

  • Native module on Android is now written in Kotlin using the new API. (#17775 by @barthap)

💡 Others

  • Migrated Expo modules definitions to the new naming convention. (#17193 by @tsapeta)

13.0.0 — 2022-04-18

🛠 Breaking changes

  • Guess the device language on iOS rather than using the app-specific language. (#15807 by @EvanBacon)

🎉 New features

  • Use JSI host object instead of the bridge module for communication between JavaScript and native code. (#16972 by @tsapeta)

🐛 Bug fixes

  • Exception in HostObject::get for prop 'NativeUnimoduleProxy': java.lang.NullPointerException (#16316 by @nomi9995)

⚠️ Notices

  • On Android bump compileSdkVersion to 31, targetSdkVersion to 31 and Java version to 11. (#16941 by @bbarthec)

12.0.1 - 2022-02-01

🐛 Bug fixes

  • Fix Plugin with id 'maven' not found build error from Android Gradle 7. (#16080 by @kudo)

12.0.0 — 2021-12-03

🎉 New features

  • Native module on iOS is now written in Swift using the new API. (#15266 by @tsapeta)

💡 Others

11.0.0 — 2021-09-28

🛠 Breaking changes

🐛 Bug fixes

  • Fix building errors from use_frameworks! in Podfile. (#14523 by @kudo)

10.2.0 — 2021-06-16

🐛 Bug fixes

💡 Others

  • Build Android code using Java 8 to fix Android instrumented test build error. (#12939 by @kudo)

10.1.0 — 2021-03-10

🎉 New features

  • Updated Android build configuration to target Android 11 (added support for Android SDK 30). (#11647 by @bbarthec)
  • Add currency, isMetric, decimalSeparator, digitGroupingSeparator properties. (#11663 by @IjzerenHein)
  • Add support for region property for Android. (#11663 by @IjzerenHein)

🐛 Bug fixes

  • Fix invalid region property on Web when locale contains script or variant fields. (#11663 by @IjzerenHein)
  • Remove peerDependencies and unimodulePeerDependencies from Expo modules. (#11980 by @brentvatne)

10.0.0 — 2021-01-15

🛠 Breaking changes

9.1.0 — 2020-11-17

This version does not introduce any user-facing changes.

9.0.0 — 2020-08-18

🛠 Breaking changes

  • Localization.region changed from undefined | string to null | string on web to match iOS. (#8824 by @EvanBacon)

🎉 New features

🐛 Bug fixes

  • Localization.region now returns null when a partial locale is defined by the browser on web. (#8824 by @EvanBacon)

8.2.1 — 2020-05-29

This version does not introduce any user-facing changes.

8.2.0 — 2020-05-27

🐛 Bug fixes

  • Fixed Localization.locale throwing an exception on the iOS simulator. (#8193 by @lukmccall)