react-intlayer
Version:
Easily internationalize i18n your React applications with type-safe multilingual content management.
40 lines (39 loc) • 1.16 kB
TypeScript
import * as react1 from "react";
import { FC, PropsWithChildren } from "react";
import { LocalesValues } from "@intlayer/types";
//#region src/server/IntlayerServerProvider.d.ts
/**
* Context that store the current locale on the server side
*/
declare const IntlayerServerContext: FC<PropsWithChildren<{
value?: LocalesValues;
}>> & {
Provider: FC<PropsWithChildren<{
value?: LocalesValues;
}>>;
Consumer: FC<PropsWithChildren<{
children: (context: LocalesValues) => react1.ReactNode;
}>>;
_storage: () => {
value: LocalesValues;
};
_defaultValue: LocalesValues;
};
/**
* Hook that provides the current locale
*/
declare const useIntlayer: () => LocalesValues;
/**
* Get the current locale
*/
declare const locale: LocalesValues;
type IntlayerServerProviderProps = PropsWithChildren & {
locale?: LocalesValues;
};
/**
* Provider that store the current locale on the server side
*/
declare const IntlayerServerProvider: FC<IntlayerServerProviderProps>;
//#endregion
export { IntlayerServerContext, IntlayerServerProvider, IntlayerServerProviderProps, locale, useIntlayer };
//# sourceMappingURL=IntlayerServerProvider.d.ts.map