lr-i18n
Version:
Allows to connect your `Laravel` Framework localization files with `React`.
14 lines (11 loc) • 338 B
text/typescript
import { createContext } from 'react';
import ContextInterface from './interfaces/context';
export const Context = createContext<ContextInterface>({
t: (key) => '',
tChoice: (key) => '',
currentLocale: () => '',
getLocales: () => [''],
isLocale: (locale) => true,
loading: true,
setLocale: (locale) => {}
});