@particular.cloud/i18n-react
Version:
i18n-react builds on top of i18n-js and implements a translation hook and provider
19 lines (18 loc) • 716 B
TypeScript
import type { PropsWithChildren } from 'react';
import React from 'react';
import { ParticularConfig } from '@particular.cloud/i18n-js';
export declare type LangCodeOrLocale = string;
interface I18nContext {
langCodeOrLocale?: LangCodeOrLocale;
published?: Date;
config?: ParticularConfig;
}
export declare const I18nContext: React.Context<I18nContext>;
export interface I18nProviderProps {
config?: ParticularConfig;
}
/**
* I18nProvider: set your Particular.Cloud project token and add options to your ParticularConfig (resets all prior configurations)
*/
export declare function I18nProvider({ config, children }: PropsWithChildren<I18nProviderProps>): JSX.Element;
export {};