# General Translation React SDKs (gt-react, gt-next, gt-react-native): useLocaleProperties
URL: https://generaltranslation.com/en-GB/docs/react/reference/hooks/use-locale-properties.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Read display metadata for a locale. API reference for useLocaleProperties.

The `useLocaleProperties` hook resolves a locale code into its human-readable details: name, native name, language, region, and script.

*Available in `gt-react`, `gt-next`, and `gt-react-native`.*

*Note: not exported by `gt-tanstack-start`.*

## Overview [#overview]

Call `useLocaleProperties` with a locale code to get its properties.

*Examples import from `gt-react`; import from your framework&#39;s package instead.*

```tsx
import { useLocale, useLocaleProperties } from 'gt-react';

export default function LocaleInfo() {
  const locale = useLocale();
  const props = useLocaleProperties(locale); // [!code highlight]
  return (
    <div>
      <p>Name: {props.name}</p>
      <p>Native name: {props.nativeName}</p>
      <p>Region: {props.regionName}</p>
    </div>
  );
}
```

*Note: In `gt-react`, use `useLocaleProperties` within a [`<GTProvider>`](/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&#39;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&#39;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&#39;s own language.           | `string` |
| `maximizedCode`            | The fully expanded locale code, such as `en-Latn-US`.   | `string` |
| `emoji`                    | Emoji associated with the locale&#39;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).

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
