react-intlayer
Version:
Easily internationalize i18n your React applications with type-safe multilingual content management.
28 lines • 981 B
TypeScript
import type { LocalesValues } from '@intlayer/config/client';
import { type FC, type PropsWithChildren } from 'react';
type IntlayerValue = {
locale: LocalesValues;
setLocale: (newLocale: LocalesValues) => void;
disableEditor?: boolean;
};
/**
* Context that store the current locale on the client side
*/
export declare const IntlayerClientContext: import("react").Context<IntlayerValue>;
/**
* Hook that provides the current locale
*/
export declare const useIntlayerContext: () => IntlayerValue;
export type IntlayerProviderProps = PropsWithChildren<{
locale?: LocalesValues;
defaultLocale?: LocalesValues;
setLocale?: (locale: LocalesValues) => void;
disableEditor?: boolean;
}>;
/**
* Provider that store the current locale on the client side
*/
export declare const IntlayerProviderContent: FC<IntlayerProviderProps>;
export declare const IntlayerProvider: FC<IntlayerProviderProps>;
export {};
//# sourceMappingURL=IntlayerProvider.d.ts.map