---
title: "ember-intl"
description: "The preset for ember-intl. It reads the t helper in Handlebars and template-tag files, and intl.t in code."
canonical_url: "https://x18n.dev/presets/ember-intl"
---
# ember-intl

> The preset for ember-intl. It reads the t helper in Handlebars and template-tag files, and intl.t in code.

The `ember-intl` preset supports [ember-intl](https://ember-intl.github.io/ember-intl).

## Detection

The preset applies when the project depends on `ember-intl`.

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

export default defineConfig({
  presets: ['ember-intl'],
})
```

## Locale files

If your config has no `resources`, the preset uses `translations/{locale}.{ext}` and `translations/{namespaces}/{locale}.{ext}`.

## Supported syntax

In `.hbs`, `.gjs` and `.gts` files, the preset reads the `t` helper, as a mustache and as a subexpression:

<!-- eslint-skip -->

```hbs [app/templates/a.hbs]
<h1>{{t 'a.b'}}</h1>
<p>{{concat (t 'a.c') '!'}}</p>
```

In JS and TS files, `intl.t` is a translate call, also as `this.intl.t`.

## Placeholders

ICU MessageFormat, as for [next-intl](https://x18n.dev/presets/next-intl#placeholders).

## Extraction templates

| Kinds                      | Files      | Template                     |
| -------------------------- | ---------- | ---------------------------- |
| any                        | `**/*.hbs` | `{{t '{key}'}}`              |
| `js-string`, `js-template` | any        | `this.intl.t('{key}'{args})` |


## Sitemap

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