# gt-next: General Translation Next.js SDK: getRegion URL: https://generaltranslation.com/en-US/docs/next/api/helpers/get-region.mdx --- title: getRegion description: API reference for the getRegion server-side method --- {/* AUTO-GENERATED: Do not edit directly. Edit the template in content/docs-templates/ instead. */} ## Overview The `getRegion` function retrieves the user's current region code from the built-in region cookie during server-side rendering. `getRegion` is a server-side method and can only be used in server components. For client-side usage, see [`useRegion`](/docs/next/api/helpers/use-region). ## Reference ### Returns `Promise` — A promise that resolves to the user's region code (e.g., `"US"`, `"CA"`), or `undefined` if no region has been set. --- ## Examples ### Basic usage ```jsx title="RegionDisplay.jsx" copy import { getRegion } from 'gt-next/server'; export default async function RegionDisplay() { const region = await getRegion(); // [!code highlight] return

Current region: {region ?? 'Not set'}

; } ``` --- ## Notes - `getRegion` is asynchronous and must be awaited. - Returns `undefined` if the user has not selected a region. - The region is stored in a cookie and can be set using the [``](/docs/next/api/components/region-selector) component or [`useRegionSelector`](/docs/next/api/helpers/use-region-selector) hook. ## Next steps - See [`useRegion`](/docs/next/api/helpers/use-region) for the client-side equivalent. - Use [``](/docs/next/api/components/region-selector) to let users choose their region.