N
Nuxt4mo ago
reflex

i18n dynamically load locale files

I am trying to load lazy json file with translations
export default async (context) => {
return await new Promise((resolve, reject) => {
context.$axios
.get('/static/lang/cs-CZ.json')
.then((response) => {
resolve(response.data)
})
.catch((error) => {
reject(error)
})
})
}
export default async (context) => {
return await new Promise((resolve, reject) => {
context.$axios
.get('/static/lang/cs-CZ.json')
.then((response) => {
resolve(response.data)
})
.catch((error) => {
reject(error)
})
})
}
But it make SSR return translation keys and then call ajax call which load messages from json Any idea?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server