Creation:2026-06-12Last update:2026-06-12
Reference this doc to your favorite AI assistantChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
Version History
- "Release of the dynamic dictionaries feature"v9.0.06/12/2026
Edit this doc
If you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy
Copy doc Markdown to clipboard
Dynamic Dictionaries
Intlayer supports three mechanisms for expressing content that goes beyond a single static dictionary per key. Each is declared through a top-level metadata field in the content file; no wrapper function is needed.
Show all table content
Open the table in a modal to view all data content clearly
| Feature | Metadata field | Selector in useIntlayer |
|---|---|---|
| Collections | item: N | { item: N } |
| Variants | variant: "name" | { variant: "name" } |
| Dynamic Records | meta: { id, … } | { id, … } |
All three compose with the locale argument and support selective / lazy loading via importMode.
When to use which
- Collections — ordered list of items managed in separate files (FAQ entries, blog posts, products).
- Variants — named content alternatives for A/B tests, seasonal banners, or feature flags.
- Dynamic records — content fetched at runtime by an opaque ID (CMS records, user-specific copy).
Selector disambiguation
When multiple selectors are present on a dictionary, the resolution order is:
plaintext
Copy code
Copy the code to the clipboard
variant → meta → item