aymericzip/intlayer-skills / skills/intlayer-remix
intlayer-remix
VerifiedIntegrates Intlayer internationalization with Remix 3 applications. Use when the user asks to "setup Remix i18n", register the Intlayer router middleware, or use the "useIntlayer" / "useLocale" hooks in Remix route handlers and views.
| File | Kind | Size |
|---|---|---|
| LICENCE.md | markdown | 10.7 KB |
| SKILL.md | skill md | 3.1 KB |
| references/compiler.md | markdown | 14.6 KB |
| references/concept_collections.md | markdown | 5.6 KB |
| references/concept_variants.md | markdown | 20.9 KB |
| references/environment_remix-3.md | markdown | 20.8 KB |
| references/formatters.md | markdown | 17.3 KB |
| references/packages_intlayer_exports.md | markdown | 12.4 KB |
| references/packages_remix-intlayer_Intlayer.md | markdown | 2.5 KB |
| references/packages_remix-intlayer_exports.md | markdown | 10.2 KB |
| references/packages_remix-intlayer_intlayerMiddleware.md | markdown | 4.0 KB |
| references/packages_remix-intlayer_useDictionary.md | markdown | 2.8 KB |
| references/packages_remix-intlayer_useIntlayer.md | markdown | 2.9 KB |
| references/packages_remix-intlayer_useLocale.md | markdown | 3.4 KB |
references/packages_remix-intlayer_useDictionary.md
View on GitHub---
createdAt: 2026-09-19
updatedAt: 2026-09-19
priority: 5
title: useDictionary Hook Documentation | remix-intlayer
description: See how to use the useDictionary hook in Remix 3 applications to resolve dictionary objects for the current request locale.
keywords:
- useDictionary
- dictionary
- remix
- remix-3
- Intlayer
- intlayer
- Internationalization
- Documentation
slugs:
- doc
- packages
- remix-intlayer
- useDictionary
history:
- version: 9.5.5
date: 2026-09-19
changes: "Init doc"
author: aymericzip
---
# useDictionary Hook Documentation
The `useDictionary` hook transforms an imported or inline dictionary object and returns its content resolved for the current request's locale in Remix 3 applications.
Unlike `useIntlayer`, which resolves dictionaries by their string key from the global dictionary registry, `useDictionary` accepts a dictionary object directly.
## Usage
```ts fileName="src/views/home.ts"
import { useDictionary } from "remix-intlayer";
import homeContent from "./home.content";
export const HomeView = () => {
const content = useDictionary(homeContent);
return `
<div>
<h1>${content.title}</h1>
<p>${content.subtitle}</p>
</div>
`;
};
```
You can also pass inline dictionaries defined with `t()`:
```ts
import { useDictionary } from "remix-intlayer";
import { t } from "intlayer";
export const FooterView = () => {
const content = useDictionary({
key: "footer",
content: {
copyright: t({
en: "All rights reserved.",
fr: "Tous droits réservés.",
es: "Todos los derechos reservados.",
}),
},
});
return `<footer>${content.copyright}</footer>`;
};
```
## Parameters
```ts
useDictionary(dictionary, localeOrSelector?)
```
1. **`dictionary`**: A dictionary object or qualified dictionary group.
2. **`localeOrSelector`** (optional): A specific locale or selector object (`{ item }`, `{ variant }`, optionally with `locale`). Takes precedence over the request locale if supplied.
## Description
The hook performs the following tasks:
1. **Locale Detection**: Reads the active request locale from the `AsyncLocalStorage` store created by the `intlayer()` middleware.
2. **Content Resolution**: Evaluates translations (`t()`), enumerations, conditions, and nested structures according to the resolved locale.
3. **Selector Processing**: Applies any item or variant selectors specified in the arguments.
## Related Documentation
- [`intlayer` Middleware](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/remix-intlayer/intlayerMiddleware.md)
- [`useIntlayer` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/remix-intlayer/useIntlayer.md)
- [`useLocale` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/remix-intlayer/useLocale.md)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |