`;\n }\n ```\n\n \n\n\n### With explicit locale\n\n```tsx\nconst content = useIntlayer(\"product-copy\", {\n id: \"prod_abc\",\n userId: \"user_123\",\n locale: \"fr\",\n});\n```\n\n### Missing meta field — compile-time error\n\n```ts\n// Type error: `userId` is missing\nconst content = useIntlayer(\"product-copy\", { id: \"prod_abc\" });\n```\n\n## Loading mode\n\nDynamic records are typically loaded lazily. Set `importMode` on the dictionary to control this:\n\n```ts contentDeclarationFormat={[\"typescript\", \"esm\", \"commonjs\"]}\nconst dictionary = {\n key: \"product-copy\",\n importMode: \"fetch\", // or \"dynamic\"\n meta: { id: \"prod_abc\", userId: \"user_123\" },\n content: { … },\n} satisfies Dictionary;\n\nexport default dictionary;\n```\n\nSee [bundle optimization](/doc/concept/bundle-optimization) for details on `static`, `dynamic`, and `fetch` modes.\n\n## Typical use-cases\n\n- Per-product marketing copy managed in a CMS\n- User-specific or account-specific content\n- Any content keyed by an opaque runtime ID\n","description":"Use the meta field in Intlayer content files to declare CMS-managed records fetched at runtime by an opaque ID, enabling strongly-typed dynamic content without build-time enumeration.","url":"https://intlayer.org/doc/concept/dynamic-records","datePublished":"2026-06-12","dateModified":"2026-06-12","version":"9.0.0","keywords":"Dynamic Records, Dynamic Content, CMS, Runtime Content, Intlayer, Internationalization","license":"https://raw.githubusercontent.com/aymericzip/intlayer/refs/heads/main/LICENSE","audience":{"@type":"Audience","audienceType":"Developers, Content Managers"}}
A dynamic record is a content file whose identity is not a sequential index or a named variant, but an arbitrary set of key-value pairs declared in a meta field. Intlayer uses those fields as the selector at runtime, making it possible to address CMS records, user-specific copy, or any content whose keys are not known at build time.
Declaring dynamic records
product-copy.abc.content.ts
Copy code
Copy the code to the clipboard
import { t, type Dictionary } from "intlayer";
const dictionary = {
key: "product-copy",
meta: {
id: "prod_abc",
userId: "user_123",
},
content: {
name: t({ en: "Widget Pro", fr: "Widget Pro" }),
description: t({ en: "The best widget.", fr: "Le meilleur widget." }),
},
} satisfies Dictionary;
export default dictionary;