# General Translation React SDKs (gt-react, gt-next, gt-react-native): `<Tx>`
URL: https://generaltranslation.com/it/docs/react/nextjs/reference/components/tx.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Traduci JSX al momento della richiesta nei componenti server dell'App Router di Next.js. Riferimento API per il componente `<Tx>`.

Il componente `<Tx>` traduce JSX al momento della richiesta tramite l&#39;API di General Translation. Usalo per contenuto dinamico che non è noto in fase di build; usa [`<T>`](/docs/react/reference/components/t) per contenuto sorgente statico.

`<Tx>` è disponibile solo lato server e non funziona con il Pages Router.

## Panoramica [#overview]

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

<Tx context="Greeting loaded at request time">Welcome back</Tx>;
```

## Props [#props]

| Prop         | Descrizione                                                                                             | Type        | Facoltativo | Predefinito                                     |
| ------------ | ------------------------------------------------------------------------------------------------------- | ----------- | ----------- | ----------------------------------------------- |
| `children`   | Contenuto JSX da tradurre.                                                                              | `ReactNode` | No          | —                                               |
| `context`    | Contesto che guida la traduzione.                                                                       | `string`    | Sì          | —                                               |
| `maxChars`   | Numero intero positivo massimo richiesto al servizio di traduzione; non tronca il contenuto restituito. | `number`    | Sì          | —                                               |
| `locale`     | Sovrascrive l&#39;impostazione regionale di destinazione.                                               | `string`    | Sì          | Impostazione regionale della richiesta corrente |
| `[variable]` | Variabile denominata inserita nel contenuto tradotto.                                                   | `ReactNode` | Sì          | —                                               |

## Restituisce [#returns]

**Tipo** `Promise<ReactNode>`

## Esempio [#example]

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

export default async function ProfilePage() {
  return <Tx context="Account page heading">Welcome back</Tx>;
}
```

## Sitemap

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