Closed JPetitpierre closed 6 months ago
You have an entirely different scheme that what the default behavior is expecting. We expect language code as a top level dir, and locales underneath. I'm not against the structure you are using, but we have never used something like that.
https://github.com/alienfast/vite-plugin-i18next-loader/blob/main/src/index.ts#L84
// all subdirectories match language codes
const langs = enumerateLangs(nextLocaleDir)
You would have to:
How can I configure
vite.config.ts
andi18next.init()
to handle a structure like this one?I tried
i18nextLoader({paths: ['./locales/contacts', './locales/products'],})
but resources getundefined
...thanks!