---
title: "solid-primitives-i18n"
description: "The preset for @solid-primitives/i18n. It reads t calls in Solid components and scripts, and {{name}} placeholders."
canonical_url: "https://x18n.dev/presets/solid-primitives-i18n"
---
# solid-primitives-i18n

> The preset for @solid-primitives/i18n. It reads t calls in Solid components and scripts, and {{name}} placeholders.

The `solid-primitives-i18n` preset supports [@solid-primitives/i18n](https://www.npmjs.com/package/@solid-primitives/i18n) in SolidJS projects.

## Detection

The preset applies when the project depends on `@solid-primitives/i18n`.

```ts [x18n.config.ts]
import { defineConfig } from '@x18n/core'

export default defineConfig({
  presets: ['solid-primitives-i18n'],
})
```

## Supported syntax

These names count as translate calls: `t` and `i18n.t`. Dictionary keys are dot paths.

```tsx [src/App.tsx]
const t = i18n.translator(dict)

export default () => <h1>{t('home.title', { name: 'Ada' })}</h1>
```

## Placeholders

Double braces: `{{name}}`.

## Extraction templates

| Kinds                      | Template                    |
| -------------------------- | --------------------------- |
| `jsx-text`                 | `{t('{key}'{args})}`        |
| `jsx-attribute`            | `{attr}={t('{key}'{args})}` |
| `js-string`, `js-template` | `t('{key}'{args})`          |


## Sitemap

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