i18n translations files not packed
See original GitHub issueWhen try to pack solution with npm run dist-windows
inside folder: dist/win-unpacked
not exsist folder: app/localization/locales
with subfolder and file translation but if I open application (selected english language for example) and show page that present a traslation string, file: dist/win-unpacked/app/localization/locales/en/translation.missing.json
has been created with key and value.
Which best way to include app/localization/locales
folder inside dist/win-unpacked
(for example in windows build)?
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Django i18n translations not working in production (Heroku)
The problem is that .mo files (compiled translations) are not present in the repo, and therefore not packaged to be deployed together with ......
Read more >Current File not filled - RegEx problem · Issue #231 - GitHub
Hi - I am on a nodejs project using i18next as a framework. It seems the extension does not scan the currently edited...
Read more >I18n in Go: Managing Translations - Alex Edwards
How to use gotext to parse translated JSON files and create a catalog containing translated messages. How to manage variables in messages ...
Read more >Add or Load Translations - i18next documentation
There are a few options to load translations to your application instrumented by i18next. The most common approach to this adding a so...
Read more >How to translate JSON files: guide to l10n & i18n with examples
In this article you'll learn about JSON localization, internationalization, working with JSON, and how to translate JSON files.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @pczyzyk and @dotexe0. This new release has these values in the template now, thanks for making this template better for all who use it. I tested this both in dev mode and after packaging the app in Windows & Mac and both changed the language (header/page) successfully.
i18n.config.js
preload.js
@dotexe0 's solution is fine, but I needed to use some more platform specific paths all over the app, so I used
electron-cfg
module and set three parameters in main.js:Then I’m setting a window.api.app variable in
preload.js
like this:I’m not sure if that is the most efficient way to do that, but it enables me to access
appPath
appExecPath
andappExtraFilesPath
throughout the app and at the same time dump values to config file.