# General Translation React SDKs (gt-react, gt-next): useLocaleProperties URL: https://generaltranslation.com/en-GB/docs/react/reference/hooks/use-locale-properties.mdx --- title: useLocaleProperties description: Read display metadata for a locale with General Translation gt-react. API reference for useLocaleProperties. --- The `useLocaleProperties` hook returns display metadata for a locale — its name, native name, language, region, and script. *Available in `gt-react`, `gt-next`, and `gt-react-native`. Examples import from `gt-react`; import from your framework's package instead.* *Note: not exported by `gt-tanstack-start`.* ## Overview [#overview] Call `useLocaleProperties` with a locale code to get its properties. ```tsx import { useLocale, useLocaleProperties } from 'gt-react'; export default function LocaleInfo() { const locale = useLocale(); const props = useLocaleProperties(locale); // [!code highlight] return (

Name: {props.name}

Native name: {props.nativeName}

Region: {props.regionName}

); } ``` *Note: In `gt-react`, use `useLocaleProperties` within a [``](/docs/react/reference/components/gt-provider). In `gt-next`, it also works in server components.* ## How it works [#how-it-works] The hook resolves the given locale code into a [`LocaleProperties`](/docs/platform/core/reference/types/locale-properties) object, which is useful for building custom locale selectors or showing locale metadata to users. ## Parameters [#parameters] | Parameter | Description | Type | Optional | Default | | ------------------- | ----------------------- | -------- | -------- | ------- | | [`locale`](#locale) | The locale to describe. | `string` | No | — | ### `locale` [#locale] **Type** `string` · **Required** A BCP 47 locale code, such as `en-US` or `ja`. ## Returns [#returns] **Type** [`LocaleProperties`](/docs/platform/core/reference/types/locale-properties) An object describing the locale. Key fields include: | Field | Description | Type | | -------------------------- | ------------------------------------------------------- | -------- | | `code` | The locale code, such as `en-US`. | `string` | | `name` | English name of the locale, such as `American English`. | `string` | | `nativeName` | Name in the locale's own language. | `string` | | `languageCode` | The language subtag, such as `en`. | `string` | | `languageName` | English name of the language. | `string` | | `nativeLanguageName` | Language name in its own language. | `string` | | `nameWithRegionCode` | Locale name including region, such as `English (US)`. | `string` | | `nativeNameWithRegionCode` | Native locale name including region. | `string` | | `regionCode` | The region subtag, such as `US`. | `string` | | `regionName` | English name of the region. | `string` | | `nativeRegionName` | Region name in the locale's own language. | `string` | | `scriptCode` | The script subtag, such as `Latn`. | `string` | | `scriptName` | English name of the script. | `string` | | `nativeScriptName` | Script name in the locale's own language. | `string` | | `maximizedCode` | The fully expanded locale code, such as `en-Latn-US`. | `string` | | `emoji` | Emoji associated with the locale's region. | `string` | See [`LocaleProperties`](/docs/platform/core/reference/types/locale-properties) for the complete set of fields. ## Notes [#notes] * `useLocaleProperties` is synchronous and works in server and client components. * To read the active locale, use [`useLocale`](/docs/react/reference/hooks/use-locale).