How to use the react-i18nify.setTranslations function in react-i18nify

To help you get started, we’ve selected a few react-i18nify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zhw2590582 / SubPlayer / src / index.js View on Github external
import ReactDOM from 'react-dom';
import App from './components/App';
import toastr from 'toastr';
import NProgress from 'nprogress';
import * as serviceWorker from './serviceWorker';
import { isMobile } from './utils';
import { setTranslations, t } from 'react-i18nify';
import i18n from './i18n';
import 'normalize.css';
import './fontello/css/fontello.css';
import 'toastr/build/toastr.css';
import 'nprogress/nprogress.css';
import 'react-virtualized/styles.css';
import 'artplayer-react/dist/artplayer-react.css';

setTranslations(i18n);
toastr.options.timeOut = 3000;
toastr.options.hideDuration = 300;
NProgress.configure({ minimum: 0, showSpinner: false });
ReactDOM.render(isMobile() ? t('access') : , document.getElementById('root'));
serviceWorker.unregister();