# General Translation React SDKs (gt-react, gt-next, gt-react-native): getTranslations URL: https://generaltranslation.com/en-US/docs/react/tanstack-start/reference/functions/get-translations.mdx --- title: getTranslations description: Read dictionary translations in TanStack Start server functions with General Translation. API reference for getTranslations. --- The `getTranslations` function returns a dictionary lookup function for the current server request. Import it from `gt-tanstack-start/server`. ## Overview [#overview] ```ts import { getTranslations } from 'gt-tanstack-start/server'; const t = await getTranslations('account'); const heading = t('heading'); ``` ```ts getTranslations(rootId?: string): Promise ``` ## Parameters [#parameters] | Parameter | Description | Type | Optional | Default | | --- | --- | --- | --- | --- | | `rootId` | Prefix applied to each dictionary id. | `string` | Yes | — | ## How it works [#how-it-works] `getTranslations` reads the locale and internationalization setting created by [`gtMiddleware`](/docs/react/tanstack-start/reference/functions/gt-middleware). The optional `rootId` scopes every lookup under one dictionary path. The function throws when called outside an active middleware request scope. Looking up an unknown dictionary id also throws. ## Returns [#returns] **Type** `Promise<(id: string, options?: DictionaryTranslationOptions) => string>` The resolved function accepts [`DictionaryTranslationOptions`](/docs/react/reference/types/dictionary-translation-options) and exposes `.obj(id)` for nested dictionary objects. ## Example [#example] ```ts import { createServerFn } from '@tanstack/react-start'; import { getTranslations } from 'gt-tanstack-start/server'; export const loadHeading = createServerFn({ method: 'GET' }).handler( async () => { const t = await getTranslations('account'); return t('heading'); } ); ```