preload-trans
This commit is contained in:
parent
dd02c46174
commit
d003df96f2
|
@ -4,6 +4,8 @@ import ICU from 'i18next-icu'
|
||||||
import TimeAgo from 'javascript-time-ago'
|
import TimeAgo from 'javascript-time-ago'
|
||||||
import enTime from 'javascript-time-ago/locale/en'
|
import enTime from 'javascript-time-ago/locale/en'
|
||||||
import ruTime from 'javascript-time-ago/locale/ru'
|
import ruTime from 'javascript-time-ago/locale/ru'
|
||||||
|
import en from '~/intl/locales/en/translation.json'
|
||||||
|
import ru from '~/intl/locales/ru/translation.json'
|
||||||
|
|
||||||
TimeAgo.addLocale(enTime)
|
TimeAgo.addLocale(enTime)
|
||||||
TimeAgo.addLocale(ruTime)
|
TimeAgo.addLocale(ruTime)
|
||||||
|
@ -11,8 +13,6 @@ TimeAgo.addLocale(ruTime)
|
||||||
export const i18nextInit = async (lng = 'ru') => {
|
export const i18nextInit = async (lng = 'ru') => {
|
||||||
if (!i18next.isInitialized) {
|
if (!i18next.isInitialized) {
|
||||||
console.debug('[i18next] initializing...')
|
console.debug('[i18next] initializing...')
|
||||||
const en = await import('~/intl/locales/en/translation.json')
|
|
||||||
const ru = await import('~/intl/locales/ru/translation.json')
|
|
||||||
await i18next
|
await i18next
|
||||||
.use(HttpApi)
|
.use(HttpApi)
|
||||||
.use(ICU)
|
.use(ICU)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user