UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

12 lines 476 B
import { createContext } from 'react'; import { substituteTokens } from "./substituteTokens.js"; const defaultI18nProvider = { translate: (key, options) => options?._ ? substituteTokens(options._, options) : substituteTokens(key, options), changeLocale: () => Promise.resolve(), getLocale: () => 'en', }; export const I18nContext = createContext(defaultI18nProvider); I18nContext.displayName = 'I18nContext'; //# sourceMappingURL=I18nContext.js.map