Skip to main content
Glama
localization.md1.99 kB
--- title: Localization description: A library that provides an interface for native user localization information. sourceCodeUrl: https://github.com/expo/expo/tree/sdk-51/packages/expo-localization packageName: expo-localization iconUrl: /static/images/packages/expo-localization.png platforms: ["android", "ios", "tvos", "web"] --- `expo-localization` allows you to Localize your app, customizing the experience for specific regions, languages, or cultures. It also provides access to the locale data on the native device. Using a localization library such as [`lingui-js`](https://lingui.dev/introduction), [`react-i18next`](https://react.i18next.com/), [`react-intl`](https://formatjs.io/docs/getting-started/installation/) or [`i18n-js`](https://github.com/fnando/i18n-js) with `expo-localization` will enable you to create a very accessible experience for users. ## Installation ## Configuration in app config You can configure `expo-localization` using its built-in [config plugin](/config-plugins/introduction/) if you use config plugins in your project ([EAS Build](/build/introduction) or `npx expo run:[android|ios]`). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. ```json app.json { "expo": { "plugins": ["expo-localization"] } } ``` ## Usage Find more information about using `expo-localization` and adding support for right-to-left languages in the [Localization](/guides/localization) guide. ## API ```jsx ``` ### Behavior You can use synchronous `getLocales()` and `getCalendars()` methods to get the locale settings of the user device. On iOS, the results will remain the same while the app is running. On Android, the user can change locale preferences in Settings without restarting apps. To keep the localization current, you can rerun the `getLocales()` and `getCalendars()` methods every time the app returns to the foreground. Use `AppState` to detect this.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaksm/expo-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server