# General Translation React SDKs (gt-react, gt-next, gt-react-native): DictionaryTranslationOptions
URL: https://generaltranslation.com/en-US/docs/react/reference/types/dictionary-translation-options.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Options for passing variables to dictionary entries. API reference for DictionaryTranslationOptions.

`DictionaryTranslationOptions` is the options object for dictionary lookups. It carries the interpolation variables that are inserted into a dictionary entry. It is accepted by the function returned from [`useTranslations`](/docs/react/reference/hooks/use-translations).

*These options apply wherever [`useTranslations`](/docs/react/reference/hooks/use-translations) is available — `gt-react`, `gt-next`, `gt-tanstack-start`, and `gt-react-native`.*

## Overview [#overview]

Pass interpolation variables as plain keys. Each key maps to a `{name}` placeholder in the dictionary entry.

```typescript
type DictionaryTranslationOptions = {
  [variable: string]: unknown; // interpolation variables
};
```

*Note: in `gt-react` v11 the options argument to [`useTranslations`](/docs/react/reference/hooks/use-translations) is typed as `TranslationVariables` (`Record<string, unknown>`); `DictionaryTranslationOptions` is the reference name for this shape. Variables are inserted into the translation with formatting, but are never translated themselves.*

## Properties [#properties]

| Property | Description | Type |
| --- | --- | --- |
| [`variables`](#variables) | Interpolation values, keyed by the placeholder name used in the entry. | `Record<string, unknown>` |

### `variables` [#variables]

**Type** `Record<string, unknown>`

Each key identifies where its value is inserted into the dictionary entry. Reference a variable in the entry with `{name}` syntax; its value is inserted into the translated string without being translated. Values can be formatted with [ICU message format](https://unicode-org.github.io/icu/userguide/format_parse/messages/).

## Examples [#examples]

```tsx title="dictionary.ts"
const dictionary = {
  greeting: {
    hello: 'Hello, {username}!', // {username} is an interpolation variable
  },
};

export default dictionary;
```

```tsx title="Component.tsx"
import { useTranslations } from 'gt-react';

const Component = () => {
  const t = useTranslations();
  // Pass { username } to fill the {username} placeholder
  return <div>{t('greeting.hello', { username: 'Brian123' })}</div>;
};
```

```tsx title="dictionary.ts"
const dictionary = {
  account: {
    // ICU message format formats the variable as currency
    balance: 'Your account balance: {dollars, number, ::currency/USD}!',
  },
};

export default dictionary;
```

```tsx title="Component.tsx"
import { useTranslations } from 'gt-react';

const Component = () => {
  const t = useTranslations();
  return <div>{t('account.balance', { dollars: 1000000 })}</div>;
};
```

## Notes [#notes]

- `DictionaryTranslationOptions` is used with [`useTranslations`](/docs/react/reference/hooks/use-translations) to pass variables to dictionary entries.
- For inline string translations, see [`InlineTranslationOptions`](/docs/react/reference/types/inline-translation-options).
- See the [dictionaries guide](/docs/react/guides/translating-with-dictionaries) for setup and conventions.

## Sitemap

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