# General Translation React SDKs (gt-react, gt-next, gt-react-native): useDefaultLocale
URL: https://generaltranslation.com/en-US/docs/react/reference/hooks/use-default-locale.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Read the source (default) locale. API reference for useDefaultLocale.

The `useDefaultLocale` hook returns your app's fallback language, used when a user's preferred locale is unavailable. It reads this default (source) locale from the [`<GTProvider>`](/docs/react/reference/components/gt-provider) context.

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

## Overview [#overview]

Call `useDefaultLocale` to read the source locale.

*Examples import from `gt-react`; import from your framework's package instead.*

```tsx
import { useDefaultLocale } from 'gt-react';

export default function DefaultLocale() {
  const defaultLocale = useDefaultLocale(); // [!code highlight]
  return <p>Default locale: {defaultLocale}</p>;
}
```

*Note: In `gt-react`, call `useDefaultLocale` under a [`<GTProvider>`](/docs/react/reference/components/gt-provider). In `gt-next`, it also works in server components.*

## How it works [#how-it-works]

The default locale is set through [`defaultLocale`](/docs/react/reference/config#default-locale) in your configuration. When none is specified, it defaults to `en`.

## Returns [#returns]

**Type** `string`

The application's default locale, such as `en-US`.

## Notes [#notes]

- `useDefaultLocale` is synchronous and works in server and client components.
- To read the user's active locale, use [`useLocale`](/docs/react/reference/hooks/use-locale).

## Sitemap

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