ra-core
Version:
Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React
14 lines • 594 B
JavaScript
import { createContext } from 'react';
import { substituteTokens } from './substituteTokens';
var defaultI18nProvider = {
translate: function (key, options) {
return (options === null || options === void 0 ? void 0 : options._)
? substituteTokens(options._, options)
: substituteTokens(key, options);
},
changeLocale: function () { return Promise.resolve(); },
getLocale: function () { return 'en'; },
};
export var I18nContext = createContext(defaultI18nProvider);
I18nContext.displayName = 'I18nContext';
//# sourceMappingURL=I18nContext.js.map