mon-entreprise/site/source/entry.en.tsx

27 lines
735 B
TypeScript
Raw Normal View History

import { I18nProvider } from '@react-aria/i18n'
import rules from 'modele-social'
2018-07-12 08:09:41 +00:00
import { render } from 'react-dom'
import 'regenerator-runtime/runtime'
import App from './App'
import i18next from './locales/i18n'
import ruleTranslations from './locales/rules-en.yaml'
import translateRules from './locales/translateRules'
import translations from './locales/ui-en.yaml'
import './sentry'
export const AppEn = () => (
<I18nProvider locale="en-GB">
2021-12-27 11:46:40 +00:00
<App
basename="infrance"
rules={translateRules('en', ruleTranslations, rules)}
/>
</I18nProvider>
)
i18next.addResourceBundle('en', 'translation', translations)
if (!import.meta.env.SSR) {
i18next.changeLanguage('en')
render(<AppEn />, document.querySelector('#js'))
}