laravel-i18n-react
Version:
A Vite plugin to load Laravel localization files and provide them to React applications.
14 lines (13 loc) • 456 B
TypeScript
import ReplacementsInterface from './replacements';
/**
*
*/
export default interface ContextInterface<T extends string = any> {
currentLocale: () => string;
getLocales: () => string[];
isLocale: (locale: string) => boolean;
loading: boolean;
setLocale: (locale: string) => void;
t: (key: T, replacements?: ReplacementsInterface) => string;
tChoice: (key: T, number: number, replacements?: ReplacementsInterface) => string;
}