# General Translation React SDKs (gt-react, gt-next): Translating JSX URL: https://generaltranslation.com/en-US/docs/react/guides/translating-jsx.mdx --- title: Translating JSX description: How to translate JSX in place with the General Translation component across React, Next.js, TanStack Start, and React Native. related: links: - /docs/react/guides/translating-strings - /docs/react/guides/formatting-variables - /docs/react/guides/handling-plurals-and-branches - /docs/react/guides/translating-with-dictionaries --- The [``](/docs/react/reference/components/t) component translates its JSX children into the active locale. Write your content in your source language and wrap it — General Translation extracts the text, translates it, and renders the result in place. The component behaves identically across every framework; only the import package changes. ## Wrap content in `` [#wrap] Wrap any JSX that contains user-facing text. Nested markup and elements are preserved in the translation. ```tsx import { T } from 'gt-react';

Welcome back

Your order is on its way.

; ```
```tsx import { T } from 'gt-next';

Welcome back

Your order is on its way.

; ``` *Note: In Next.js, `` works in both server and client components — the same import from `gt-next` resolves to the server or client implementation automatically.*
```tsx import { T } from 'gt-tanstack-start';

Welcome back

Your order is on its way.

; ```
```tsx import { T } from 'gt-react-native'; Welcome back Your order is on its way. ; ``` *Note: In React Native, wrap native text nodes such as `` rather than HTML elements.*
You do not assign a key or id — General Translation identifies the entry from its content. Keep the content static; use variable components for dynamic values (see [Formatting numbers and dates](/docs/react/guides/formatting-variables)). ## Disambiguate with context [#context] When the same text can translate differently depending on meaning, add `$context` so translators and the engine can tell entries apart. This works the same in every framework. ```tsx Bank ; ``` ## Keep entries stable with an id [#id] Pass `$id` to give an entry a stable identifier that does not change when you edit surrounding markup. This is optional; use it when you want a fixed reference for an entry. ```tsx

Welcome back

; ``` *Note: Content inside `` must be static JSX. Move conditional or interpolated values into [``](/docs/react/reference/components/var), [``](/docs/react/reference/components/plural), or [``](/docs/react/reference/components/branch) so the surrounding text stays translatable.* ## Next steps - /docs/react/guides/translating-strings - /docs/react/guides/formatting-variables - /docs/react/guides/handling-plurals-and-branches - /docs/react/guides/translating-with-dictionaries