# General Translation React SDKs (gt-react, gt-next, gt-react-native): `<Tx>`
URL: https://generaltranslation.com/es/docs/react/nextjs/reference/components/tx.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Traduce JSX en componentes de servidor del App Router de Next.js en tiempo de solicitud. Referencia de la API del componente `<Tx>`.

El componente `<Tx>` traduce JSX en tiempo de solicitud mediante la API de General Translation. Úsalo para contenido dinámico que no se conoce en tiempo de compilación; usa [`<T>`](/docs/react/reference/components/t) para contenido fuente estático.

`<Tx>` es solo para el servidor y no funciona con Pages Router.

## Descripción general [#overview]

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

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

## Props [#props]

| Prop         | Descripción                                                                                           | Type        | Opcional | Predeterminado                                |
| ------------ | ----------------------------------------------------------------------------------------------------- | ----------- | -------- | --------------------------------------------- |
| `children`   | Contenido JSX que se va a traducir.                                                                   | `ReactNode` | No       | —                                             |
| `context`    | Contexto que orienta la traducción.                                                                   | `string`    | Sí       | —                                             |
| `maxChars`   | Máximo de caracteres positivos solicitado al servicio de traducción; no trunca el contenido devuelto. | `number`    | Sí       | —                                             |
| `locale`     | Sobrescribe la configuración regional de destino.                                                     | `string`    | Sí       | Configuración regional actual de la solicitud |
| `[variable]` | Variable con nombre insertada en el contenido traducido.                                              | `ReactNode` | Sí       | —                                             |

## Devuelve [#returns]

**Tipo** `Promise<ReactNode>`

## Ejemplo [#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.
