Tác giả:
    Ngày tạo:2026-01-21Cập nhật lần cuối:2026-01-21

    Tài liệu thành phần IntlayerProvider

    Thành phần IntlayerProvider là provider chính cho Intlayer trong các ứng dụng React. Nó cung cấp context của Intlayer cho tất cả các phần tử con của nó.

    Sử dụng

    tsx
    import { IntlayerProvider } from "react-intlayer";
    
    const App = ({ children }) => <IntlayerProvider>{children}</IntlayerProvider>;
    

    Thuộc tính (Props)

    Thuộc tínhKiểuMô tả
    localeLocalesValuesLocale khởi tạo để sử dụng.
    defaultLocaleLocalesValuesLocale mặc định để sử dụng làm dự phòng.
    setLocale(locale: LocalesValues) => voidHàm tuỳ chỉnh để thiết lập locale.
    disableEditorbooleanChỉ định có vô hiệu hóa trình chỉnh sửa hay không.
    isCookieEnabledbooleanChỉ định có bật cookie để lưu locale hay không.