Closed Yomisana closed 2 years ago
i18n-node was build for server side node.js usage. While it could work in a packaged electron app, there might be other issues as well. That been said, my guess is that the "path" to your locales will be different in the packed app than in dev mode.
To come around that, you might use https://github.com/mashpie/i18n-node#some-words-on-staticcatalog-option to statically feed i18n with locales at the build step. Unfortunately I don't have any example on how to achieve that with electron (and ist various build methods).
Instinctively I'd choose another i18n framework that is more frontend-related or officially supporting electron, like https://www.i18next.com/ (as far as I get it)
I just tried using the staticCatalog option as you said and it works! Oh! Thanks for letting me know this is for server side node.js .Using it currently works I like the format too. :heart:
glad to hear 👍
❌ can't work ✔️ can work
project tree (electron)
i18n.config.js