`;\n }\n ```\n\n \n\n\n### 명시적 로케일 사용 시\n\n```tsx\nconst content = useIntlayer(\"product-copy\", {\n id: \"prod_abc\",\n userId: \"user_123\",\n locale: \"ko\",\n});\n```\n\n### 필수 meta 필드 누락 — 컴파일 오류\n\n```ts\n// 타입 오류: `userId` 누락\nconst content = useIntlayer(\"product-copy\", { id: \"prod_abc\" });\n```\n\n## 로딩 모드 (loading mode)\n\n동적 레코드는 일반적으로 지연 로드됩니다. 이를 제어하려면 사전에 `importMode`를 설정합니다.\n\n```ts contentDeclarationFormat={[\"typescript\", \"esm\", \"commonjs\"]}\nconst dictionary = {\n key: \"product-copy\",\n importMode: \"fetch\", // 또는 \"dynamic\"\n meta: { id: \"prod_abc\", userId: \"user_123\" },\n content: { … },\n} satisfies Dictionary;\n\nexport default dictionary;\n```\n\n`static`, `dynamic`, `fetch` 모드에 대한 자세한 내용은 [번들 최적화](/ko/doc/concept/bundle-optimization)를 참조하세요.\n\n## 일반적인 사용 사례\n\n- CMS에서 관리하는 제품별 마케팅 문구\n- 사용자별 또는 계정별 맞춤 콘텐츠\n- 불투명한 런타임 ID로 식별되는 임의의 콘텐츠\n","description":"불투명한 ID로 런타임에 가져오는 CMS 관리형 레코드를 선언하기 위해 Intlayer 콘텐츠 파일에서 meta 필드를 사용합니다. 이를 통해 빌드 시점의 열거 없이 강력한 형식의 동적 콘텐츠를 지원합니다.","url":"https://intlayer.org/ko/doc/concept/dynamic-records","datePublished":"2026-06-12","dateModified":"2026-06-12","version":"9.0.0","keywords":"동적 레코드, 동적 콘텐츠, CMS, 런타임 콘텐츠, Intlayer, 국제화","license":"https://raw.githubusercontent.com/aymericzip/intlayer/refs/heads/main/LICENSE","audience":{"@type":"Audience","audienceType":"개발자, 콘텐츠 관리자"}}
동적 레코드(dynamic record)는 고유 식별자가 순차적 인덱스나 이름이 지정된 변형이 아니라, meta 필드에 선언된 임의의 키-값 쌍의 집합인 콘텐츠 파일입니다. Intlayer는 런타임 시 이 필드들을 선택기로 사용하여 CMS 레코드, 사용자 특정 텍스트 또는 빌드 시점에 키를 알 수 없는 임의의 콘텐츠에 접근할 수 있게 합니다.
동적 레코드 선언
product-copy.abc.content.ts
코드 복사
코드를 클립보드에 복사
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;