# gt-next: General Translation Next.js SDK: GTProvider URL: https://generaltranslation.com/en-US/docs/next/api/components/gtprovider.mdx --- title: GTProvider description: API reference for the GTProvider component --- ## Overview The `` component provides General Translation (GT) context to its children, enabling them to access translated content. It is required for any client-side translations on your application. ### When to use - Wrap your entire application in `` to enable translations on the client. - When working with dictionaries, optionally specify an `id` to limit the dictionary data sent to the client, optimizing performance for large dictionaries. - The `` component is used for both [inline ``](/docs/next/guides/t) and [dictionaries](/docs/next/guides/dictionaries). ## Reference ### Props ### Description | Prop | Description | |-----------|-------------| | `children` | Any component or the parents of any component that needs to translate or access translation information on the client side. These should include any components using ``, `useGT`, or other translation utilities. | | `id?` | The ID of a nested dictionary to limit the data sent to the client. This is useful for large projects with extensive dictionaries. | ### Returns `JSX.Element|undefined` containing the children that were passed to this component. ## Example ### Basic usage Wrap your application in `` to provide translation context to your app. ```jsx title="layout.js" copy import { GTProvider } from 'gt-next'; export default function RootLayout({ children }) { return ( // [!code highlight] {children} // [!code highlight] ); } ``` ### Using the id prop for subsets Specify the `id` prop to optimize performance by sending only a subset of the dictionary to the client. ```jsx title="layout.js" copy import { GTProvider } from 'gt-next'; export default function RootLayout({ children }) { return ( // [!code highlight] {children} ); } ``` --- ## Notes * The `` must wrap all `` components and other translation-related components in client components. Read more about it [here](/docs/next/guides/t). * For server-side translations, `` is not required but can still be used. ## Next steps * Learn more about the [`` component](/docs/next/guides/t) for translating text and components.