# General Translation React SDKs (gt-react, gt-next, gt-react-native): getTranslations
URL: https://generaltranslation.com/en-US/docs/react/nextjs/reference/functions/get-translations.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Read dictionary translations in asynchronous Next.js App Router components with General Translation. API reference for getTranslations.

The `getTranslations` function returns an asynchronous dictionary lookup function for the current App Router request. Import it from `gt-next/server` when an async component cannot use [`useTranslations`](/docs/react/reference/hooks/use-translations).

`getTranslations` is server-only and does not work with the Pages Router.

## Overview [#overview]

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

const t = await getTranslations();
const heading = t('home.heading');
```

## Parameters [#parameters]

| Parameter | Description | Type | Optional | Default |
| --- | --- | --- | --- | --- |
| `rootId` | Prefix applied to each dictionary id. | `string` | Yes | — |

## Returns [#returns]

**Type** `Promise<(id: string, options?: DictionaryTranslationOptions) => string>`

The resolved function returns the translated dictionary entry for an id and accepts [`DictionaryTranslationOptions`](/docs/react/reference/types/dictionary-translation-options). It also exposes `.obj(id)` for nested dictionary objects.

## Example [#example]

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

export default async function AccountPage() {
  const t = await getTranslations('account');
  return <h1>{t('heading')}</h1>;
}
```

## Sitemap

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