How to get the user's language in your Expo app, in short
Run npx expo install expo-localization. Then import { getLocales } from 'expo-localization' and read getLocales()[0].languageCode. That gives you the user's first preferred language as a short code such as "en", "es" or "pl". If you need the region too, read languageTag, which looks like "en-US" or "es-419". Both are synchronous, so you can call them anywhere, including at module load before your first render.
expo-localization at a glance (SDK 58)
| Question | Answer |
|---|---|
| Install | npx expo install expo-localization (58.0.x on SDK 58) |
| Works in Expo Go? | Yes, it is included |
| Permissions needed? | None |
| User's language | getLocales()[0].languageCode, for example "en" |
| Language plus region | getLocales()[0].languageTag, for example "en-US" |
| Right-to-left or not | getLocales()[0].textDirection, "ltr" or "rtl" |
| Time zone and 24-hour clock | getCalendars()[0].timeZone and uses24hourClock |
| Reacts to settings changes | useLocales() and useCalendars() hooks |
What getLocales() actually returns
getLocales() returns an array of the user's locales in the order they set in their device settings, and it always contains at least one entry. So getLocales()[0] is safe to read. The fields inside it are where the surprises are, because most of them are typed as possibly null and a few come from a different setting than you would guess.
The Locale fields worth knowing
| Field | Example | What to know |
|---|---|---|
| languageTag | "en-US", "es-419" | Full language tag with region. The only field that is never null |
| languageCode | "en", "pl" | Language without the region. Can be null, so always write a fallback |
| regionCode | "US" | On iOS and Android this comes from the Region setting, not the language. Can be null on web |
| currencyCode / currencySymbol | "USD" / "$" | On iOS this follows the Region setting, not the current language. Null on web |
| measurementSystem | "metric", "us", "uk" | Null on web, where the user's choice is not exposed |
| temperatureUnit | "celsius", "fahrenheit" | Null if the region code is unknown |
| textDirection | "ltr", "rtl" | Use it to decide layout direction for the locale |
| decimalSeparator / digitGroupingSeparator | "," / " " | Useful if you parse numbers people type. For displaying numbers, use Intl instead |
Step 1: Install expo-localization and read the language
Run npx expo install expo-localization so the version matches your SDK. Reading the language needs no config and no permission. The one line you will actually write is const lang = getLocales()[0].languageCode ?? 'en', and it belongs in a single helper file rather than scattered across screens.
getCalendars() works the same way and returns the user's calendar settings: timeZone such as "America/Los_Angeles", uses24hourClock, and firstWeekday, where Sunday is 1 and Saturday is 7. If your app shows times or a week view, this is how you stop showing a US week layout to someone in Europe.
Step 2: Keep it current when the user changes language
The two platforms behave differently here, and this is the bug that AI-written localization code ships most often.
What happens when the user changes language
| Platform | Behavior | What you do |
|---|---|---|
| iOS | Changing the device language resets the app, and results stay the same while the app runs | Read the language once at startup. Nothing else needed |
| Android | The user can change locale preferences without your app restarting | Re-read getLocales() when the app returns to the foreground with AppState, or use the useLocales() hook |
Inside React components, the simplest fix is the useLocales() hook. It returns the same array as getLocales() and rerenders when the OS settings change. Outside components, for example where you configure your translation library, listen to AppState and set the locale again whenever the app comes back to active.
Step 3: Translate your strings
expo-localization only tells you the language. To actually show translated text, pair it with a translation library such as i18n-js, react-i18next or Lingui. With i18n-js the setup is short: create an I18n instance with your strings per language, set its locale from getLocales()[0].languageCode ?? 'en', turn on enableFallback so a missing key falls back to your default language instead of showing a raw key, and call i18n.t('welcome') wherever you need text.
- Keep every string in one file per language from day one, even if you only ship English. Moving strings out of components later is the expensive part, not translating them.
- Leave names and brand terms in your default language only, and let the fallback fill them in.
- Do not hand-format dates, numbers or prices. With Hermes, the Intl APIs work on all platforms, and passing 'default' as the locale uses the device's locale, for example new Intl.NumberFormat('default', { style: 'currency', currency: 'EUR' }).
- Intl formats values but cannot tell you which currency or measurement system the user prefers. That part still comes from expo-localization.
Step 4: Per-app language, RTL and your app name
Both iOS and Android let users choose a language for a single app in system settings. To appear there, your app has to declare the locales it supports. Add the expo-localization config plugin to app.json with a supportedLocales array, for example ["en", "ja"], or separate ios and android arrays. Because users can pick the app language this way, you usually do not need to build your own language picker.
expo-localization config plugin options
| Option | Default | What it does |
|---|---|---|
| supportedLocales | Not set | Declares your languages so users can pick one per app in system settings |
| supportsRTL | true | Lets the app render right-to-left for RTL device languages such as Arabic or Hebrew |
| forcesRTL | false | Forces RTL regardless of device language. Useful for testing your layout |
These options are baked into the native app, so they need a new build to take effect, not an over-the-air update. On SDK 58, RTL is on by default, but on iOS the device language must also be one of your supportedLocales for the RTL layout to kick in. Set forcesRTL to true in a test build to see where your layout breaks. Flex properties like justifyContent flip on their own, but a Text with no textAlign stays physically left aligned, so give your shared Text component textAlign: 'left', which then acts as start.
Your app name and permission prompts can be translated too. In app.json, set ios.infoPlist.CFBundleAllowMixedLocalizations to true and add a locales map such as "ja": "./languages/japanese.json". Each file can set ios.CFBundleDisplayName, android app_name and iOS usage descriptions like NSContactsUsageDescription, which Expo writes into the localized InfoPlist.strings during prebuild. A translated home screen name and translated permission prompts are what make an app feel native in a language.
Have Claude Code build it for you
Open your project in the Claude Code desktop app and describe the result. Left alone, AI-written localization code tends to read languageCode without a fallback, set the locale once and never refresh it on Android, derive currency from the language, and hand-format dates. A prompt that heads those off:
Then add a line to your CLAUDE.md such as "Strings: always src/i18n, never hardcoded. Dates and money: Intl only" so later sessions do not slip hardcoded English back in.
The short version
To get the user's language in your Expo app: install expo-localization, read getLocales()[0].languageCode with a fallback, and refresh it on Android when the app returns to the foreground or use useLocales(). Take currency and units from the region fields, not the language, format everything with Intl, and declare supportedLocales so users can pick your app's language in system settings. Test RTL with forcesRTL before you ship an RTL language.
If you are building your first iOS app with Claude Code and Expo and want a second set of eyes before App Review, bring it to App Store Launch Club. Members share their builds and help each other get unstuck, and the curriculum covers the full path from first build to first users. Pair this with our guides to localizing your app for more downloads, getting device info in your Expo app and getting the app version in your Expo app. Join at applaunchclub.co for $9 a month.
Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.
Frequently asked questions
How do I get the user's language in an Expo app?
Install expo-localization with npx expo install expo-localization, import { getLocales } from 'expo-localization' and read getLocales()[0].languageCode, with a fallback such as ?? 'en'. It is synchronous and needs no permissions.
Does expo-localization work in Expo Go?
Yes. expo-localization is included in Expo Go, so you can read the user's language without a development build. Config plugin options like supportedLocales need a new build to take effect.
Why doesn't my Expo app update when the user changes language on Android?
On Android the user can change language without your app restarting, so a value read once at startup goes stale. Re-read getLocales() when AppState returns to active, or use the useLocales() hook, which rerenders when the OS settings change. On iOS, changing the device language resets the app.
What is the difference between languageCode and languageTag?
languageCode is the language alone, such as "en", and can be null. languageTag includes the region, such as "en-US" or "es-419", and is never null.
How do I let users choose a different language for my Expo app?
Add the expo-localization config plugin to app.json with a supportedLocales array. iOS and Android then let users pick your app's language in system settings, so you usually do not need an in-app language picker.
Does my Expo app support right-to-left languages?
On SDK 58, RTL layout is on by default through the supportsRTL option. On iOS the device language must also be in your supportedLocales. Set forcesRTL to true in a test build to check your layout, and give Text components an explicit textAlign.
Last reviewed by David on November 18, 2026


