# react-native: useLocales URL: https://generaltranslation.com/en-US/docs/react-native/api/helpers/use-locales.mdx --- title: useLocales description: API reference for the useLocales hook --- {/* AUTO-GENERATED: Do not edit directly. Edit the template in content/docs-templates/ instead. */} ## Overview The `useLocales` hook retrieves the list of supported locales from the [`` context](/docs/react-native/api/components/gtprovider). `useLocales` is a client-side hook and *can only be used in client-side components*. Ensure your app is wrapped in a [``](/docs/react-native/api/components/gtprovider). For server-side usage, see [`getLocales`](/docs/react-native/api/helpers/get-locales). ## Reference ### Returns `string[]` — An array of BCP 47 [locale codes](/docs/core/locales) representing the supported locales, e.g., `['en-US', 'fr', 'ja']`. --- ## Examples ### Basic usage ```jsx title="LocaleList.jsx" copy 'use client'; import { useLocales } from 'gt-react-native'; export default function LocaleList() { const locales = useLocales(); // [!code highlight] return ( ); } ``` --- ## Notes - The `useLocales` hook relies on the [``](/docs/react-native/api/components/gtprovider) to access the context. Ensure your app is wrapped with a provider at the root level. - `useLocales` is client-side only. For server components, use [`getLocales`](/docs/react-native/api/helpers/get-locales). ## Next steps - Learn how to configure supported locales in [`gt.config.json`](/docs/react-native/api/config/gt-config-json). - See [`getLocales`](/docs/react-native/api/helpers/get-locales) for the server-side equivalent.