--- createdAt: 2025-08-23 updatedAt: 2025-08-23 priority: 5 title: Tài liệu Hook useIntlayer | react-intlayer description: "Dùng useIntlayer trong React để đọc nội dung bản địa hóa của từ điển theo key, có kiểu từ file khai báo nội dung." keywords: - useIntlayer - dictionary - key - Intlayer - Quốc tế hóa - Tài liệu - Next.js - JavaScript - React slugs: - doc - packages - react-intlayer - useIntlayer history: - version: 5.5.10 date: 2025-06-29 changes: "Khởi tạo lịch sử" author: aymericzip --- # Tài liệu Hook useIntlayer Hook `useIntlayer` cho phép bạn truy xuất nội dung được bản địa hóa từ một từ điển bằng khóa của nó. Nó dựa trên `useDictionary` nhưng tự động đưa vào một phiên bản tối ưu hóa của từ điển từ các khai báo được tạo ra. ## Ví dụ sử dụng trong React ```tsx fileName="src/components/ServerComponentExample.tsx" codeFormat={["typescript", "esm"]} import { useIntlayer } from "react-intlayer/server"; const ServerComponentExample = () => { const content = useIntlayer("server-component"); return (
{content.description}