# General Translation React SDKs (gt-react, gt-next): useDefaultLocale URL: https://generaltranslation.com/en-GB/docs/react/reference/hooks/use-default-locale.mdx --- title: useDefaultLocale description: Read the source (default) locale with General Translation gt-react. API reference for useDefaultLocale. --- The `useDefaultLocale` hook returns the application's default (source) locale from the [``](/docs/react/reference/components/gt-provider) context. This is the fallback language, used when a user’s preferred locale is unavailable. *Available in `gt-react`, `gt-next`, `gt-tanstack-start`, and `gt-react-native`. Examples import from `gt-react`; import from your framework’s package instead.* ## Overview [#overview] Call `useDefaultLocale` to read the source locale. ```tsx import { useDefaultLocale } from 'gt-react'; export default function DefaultLocale() { const defaultLocale = useDefaultLocale(); // [!code highlight] return

Default locale: {defaultLocale}

; } ``` *Note: In `gt-react`, call `useDefaultLocale` under a [``](/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 via [`defaultLocale`](/docs/react/reference/config#default-locale) in your configuration. If 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).