/* @vite-ignore */ await import('primelocale/' + event.lang + '.json').then((primeNgLocale) => {
console.log(primeNgLocale[event.lang])
this.primeNG.setTranslation(primeNgLocale[event.lang])
}).catch(async () => {
// Fallback to English if locale import fails
/* @vite-ignore */ await import('primelocale/en.json').then((primeNgLocale) => {
this.primeNG.setTranslation(primeNgLocale.en)
}).catch(() => {
console.warn(`Could not load PrimeNG locale for language: ${event.lang}`)
})
})
I tried do do this for lang switching but it won't work, any suggestions ? I noticed this warning : The above dynamic import cannot be analyzed by Vite. maybe because of that i dont know