UNPKG

ra-core

Version:

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

22 lines 718 B
import { TranslateFunction } from '../types'; /** * Translate a string using the current locale and the translations from the i18nProvider * * @see Polyglot.t() * @link https://airbnb.io/polyglot.js/#polyglotprototypetkey-interpolationoptions * * @return {Function} A translation function, accepting two arguments * - a string used as key in the translations * - an interpolationOptions object * * @example * * import { useTranslate } from 'react-admin'; * * const SettingsMenu = () => { * const translate = useTranslate(); * return <MenuItem>{translate('settings')}</MenuItem>; * } */ export declare const useTranslate: () => TranslateFunction; //# sourceMappingURL=useTranslate.d.ts.map