# Setting a Locale

Override the default device locale when using the Expo SDK so you can preview localized paywalls and targeting.

Overview [#overview]

The Expo SDK automatically uses the device's locale to localize paywalls and evaluate campaign rules. Override the locale with the `localeIdentifier` option when you need to:

* preview translations without changing the simulator or device settings
* QA rules that gate content by market or language
* capture store screenshots or marketing assets in a specific language

`localeIdentifier` accepts standard BCP‑47 identifiers such as `en_US`, `en_GB`, or `fr_CA`. You can reference Apple's [complete locale list](https://gist.github.com/jacobbubu/1836273) if you need the exact identifier for a region.

Set the locale before Superwall config [#set-the-locale-before-superwall-config]

`<SuperwallProvider />` configures the native SDK only once, so be sure the locale you want to test is decided before the provider mounts.

```tsx
import { SuperwallProvider, type PartialSuperwallOptions } from "expo-superwall";

const localeOptions: PartialSuperwallOptions = {
  localeIdentifier: "fr_FR",
};

export default function App() {
  return (
    <SuperwallProvider
      apiKeys={{
        ios: process.env.EXPO_PUBLIC_SUPERWALL_IOS_KEY!,
        android: process.env.EXPO_PUBLIC_SUPERWALL_ANDROID_KEY!,
      }}
      options={localeOptions}
    >
      <RootNavigator />
    </SuperwallProvider>
  );
}
```

Verify the active locale [#verify-the-active-locale]

Use `useSuperwall()` and `getDeviceAttributes()` to confirm which locale the native SDK currently sees. This is helpful when debugging targeting issues.

```tsx
import { useEffect } from "react";
import { useSuperwall } from "expo-superwall";

export function LocaleDebug() {
  const superwall = useSuperwall();

  useEffect(() => {
    superwall.getDeviceAttributes().then((attrs) => {
      console.log("[Superwall] localeIdentifier:", attrs.localeIdentifier);
    });
  }, [superwall]);

  return null;
}
```

Related resources [#related-resources]

* [Localization overview](/docs/localization)
* [In-App Paywall Previews](/docs/expo/quickstart/in-app-paywall-previews)