# General Translation React SDKs (gt-react, gt-next): useLocales URL: https://generaltranslation.com/en-GB/docs/react/reference/hooks/use-locales.mdx --- title: useLocales description: List the supported locales with General Translation gt-react. API reference for useLocales. --- The `useLocales` hook returns the list of supported locales from the [``](/docs/react/reference/components/gt-provider) context. *Available in `gt-react`, `gt-next`, `gt-tanstack-start`, and `gt-react-native`. The examples import from `gt-react`; import from your framework's package instead.* ## Overview [#overview] Call `useLocales` to read the supported locale codes. ```tsx import { useLocales } from 'gt-react'; export default function LocaleList() { const locales = useLocales(); // [!code highlight] return ( ); } ``` *Note: In `gt-react`, call `useLocales` inside a [``](/docs/react/reference/components/gt-provider). In `gt-next`, it also works in server components.* ## How it works [#how-it-works] The list comes from the [`locales`](/docs/react/reference/config#locales) you configure. Each entry is a BCP 47 locale code. ## Returns [#returns] **Type** `readonly string[]` An array of supported locale codes, such as `['en-US', 'fr', 'ja']`. ## Notes [#notes] * `useLocales` is synchronous and works in server and client components. * To read the active locale, use [`useLocale`](/docs/react/reference/hooks/use-locale).