# General Translation React SDKs (gt-react, gt-next): getLocale URL: https://generaltranslation.com/en-US/docs/react/nextjs/reference/functions/get-locale.mdx --- title: getLocale description: Read the current Next.js App Router request locale with General Translation. API reference for getLocale. --- The `getLocale` function returns the locale for the current App Router request as a BCP 47 locale code. Import it from `gt-next/server` in async components, Route Handlers, and other server code. `getLocale` is server-only and does not work with the Pages Router. ## Overview [#overview] ```tsx import { getLocale } from 'gt-next/server'; const locale = await getLocale(); // 'en-US' ``` ## Returns [#returns] **Type** `Promise` A promise resolving to the current request locale. General Translation resolves the locale through the configured request locale function and falls back to the default locale when needed. ## Example [#example] ```tsx title="app/[locale]/layout.tsx" import { getLocale } from 'gt-next/server'; export default async function LocaleLayout({ children }) { const locale = await getLocale(); return {children}; } ```