---
title: TranslationParams
description: Typed contract for translation keys and their placeholder arguments
---

import DocsLink from '@/components/docs/DocsLink.astro';

`TranslationParams` maps every opaque translation key to its argument shape. Keys with `never` accept only `t('key')`. Keys with an object accept `t('key', { … })` with typed placeholder names.

## Import

```ts
import type { TranslationParams } from '@videojs/core/i18n';
```

## Definition

```ts
type TranslationParams = {
  play: never;
  pause: never;
  seekForward: { seconds: number | string };
  timeRemainingPhrase: { duration: string };
  // …
};
```

English defaults and the full key list live in `packages/core/src/core/i18n/locales/en.ts`. The authoritative TypeScript map is `packages/core/src/core/i18n/types.ts`.

## Parametric keys

| Key | Placeholders | Example English value |
| --- | --- | --- |
| `seekForward` | `{seconds}` | `Seek forward {seconds} seconds` |
| `seekBackward` | `{seconds}` | `Seek backward {seconds} seconds` |
| `playbackRateAria` | `{rate}` | `Playback rate {rate}` |
| `timeSliderValueTextRange` | `{current}`, `{duration}` | `{current} of {duration}` |
| `timeRemainingPhrase` | `{duration}` | `{duration} remaining` |
| `volumeSliderValueTextMuted` | `{percent}` | `{percent}, muted` |
| `indicatorVolumeWithValue` | `{value}` | `Volume {value}` |

All other keys are plain strings with no parameters.

## Usage with Translator

```ts
const t: Translator = createTranslator(translations, 'es');

t('play');
t('seekForward', { seconds: 10 });
t('timeRemainingPhrase', { duration: '1 minute' });
```

TypeScript rejects missing placeholders when defining <DocsLink slug="reference/translations">`Translations`</DocsLink> overlays:

```ts
registerI18n('es', {
  seekForward: 'Adelantar', // error: missing {seconds}
});
```

## Related

- <DocsLink slug="reference/translations">`Translations`</DocsLink>
- <DocsLink slug="reference/translator">`Translator`</DocsLink>
- <DocsLink slug="concepts/i18n">Internationalization</DocsLink> — opaque keys overview
