# gt-next: General Translation Next.js SDK: getDefaultLocale URL: https://generaltranslation.com/en-GB/docs/next/api/helpers/get-default-locale.mdx --- title: getDefaultLocale description: API reference for the getDefaultLocale server-side method --- ## Overview The `getDefaultLocale` function retrieves the application's default locale. This locale is determined when the server starts and is used as the fallback language for translations. It returns a [locale code](/docs/core/locales), for example `'en'`. `getDefaultLocale` is a server-side method and can only be used on server-side components. See [`withGTConfig`](/docs/next/api/config/with-gt-config) for configuration. If no default locale is specified in [`withGTConfig`](/docs/next/api/config/with-gt-config), it defaults to `'en'`. For client-side use, see [`useDefaultLocale`](/docs/next/api/helpers/use-default-locale). ## Reference ### Returns A string representing the application's default locale, e.g. `'en'`. *** ## Examples ### Basic usage Retrieve the application's default locale and use it in your server-side logic. ```jsx title="GetDefaultLocale.jsx" copy import { getDefaultLocale } from 'gt-next/server'; export default function GetDefaultLocale() { const defaultLocale = getDefaultLocale(); // [!code highlight] return

Default locale: {defaultLocale}

; } ``` *** ## Notes * `getDefaultLocale` returns the default locale set in [`withGTConfig`](/docs/next/api/config/with-gt-config). * `getDefaultLocale` is server-side only. * The returned locale adheres to the [locale code](/docs/core/locales) format. ## Next steps * See [`useLocale`](/docs/next/api/helpers/use-locale) and [`getLocale`](/docs/next/api/helpers/get-locale) to retrieve the user's locale.