# General Translation React SDKs (gt-react, gt-next, gt-react-native): getRegion
URL: https://generaltranslation.com/it/docs/react/nextjs/reference/functions/get-region.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Legge la regione della richiesta corrente di Next.js App Router con General Translation. Riferimento API per getRegion.

La funzione `getRegion` restituisce la regione associata alla richiesta corrente di App Router. Importala da `gt-next/server` nei componenti asincroni e in altro codice server.

`getRegion` è disponibile solo lato server e non funziona con Pages Router.

## Panoramica [#overview]

```tsx
import { getRegion } from 'gt-next/server';

const region = await getRegion(); // 'US' o undefined
```

## Restituisce [#returns]

**Tipo** `Promise<string | undefined>`

Una promise che restituisce un codice di regione ISO 3166, oppure `undefined` se non è impostata alcuna regione.

## Esempio [#example]

```tsx title="app/account/page.tsx"
import { getRegion } from 'gt-next/server';

export default async function AccountPage() {
  const region = await getRegion();
  return <p>Region: {region ?? 'Not set'}</p>;
}
```

## Sitemap

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