format code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-11-20 19:10:36 +01:00
parent b459dc2c0d
commit abceb356db

View file

@ -5,7 +5,7 @@
*/
import type { ResourceKey } from 'i18next'
import i18n, { use as i18nUse } from 'i18next'
import i18n, { use as i18nUse } from 'i18next'
import LanguageDetector from 'i18next-browser-languagedetector'
import resourcesToBackend from 'i18next-resources-to-backend'
import { Settings } from 'luxon'
@ -13,16 +13,16 @@ import { initReactI18next } from 'react-i18next'
export const setUpI18n = async (): Promise<void> => {
await i18nUse(
resourcesToBackend((language, namespace, callback) => {
import(`../../../../../locales/${language}.json`)
.then((resources: ResourceKey) => {
callback(null, resources)
})
.catch((error: Error) => {
callback(error, null)
})
})
)
resourcesToBackend((language, namespace, callback) => {
import(`../../../../../locales/${language}.json`)
.then((resources: ResourceKey) => {
callback(null, resources)
})
.catch((error: Error) => {
callback(error, null)
})
})
)
.use(LanguageDetector)
.use(initReactI18next)
.init({