I'm facing an issue in my current electron application where the frontend is written in angular and we are providing default path information about the i18n resources i.e. 'en.json' where we are trying to access the files through assets/i18n folder. It causes the internationalization being broken and only shows the keys instead of values.
When I'm building locally its able to find the resources without any problems.
During building to windows with NSIS, I got that its creating an app.asar archive that will contain all my bundled code regarding angular and electron aswell.
Since I've installed the application is still looking for the same path, and the files are there in the given path, but seems like it cannot identify the json format inside the asar, so I modified the configuration in my app to build the resource files outside of the app.asar.
But now I'm stuck with two things:
how to get the right path to this folder outside of app.asar file
pass this path to my angular application and set this path when we are running it in production specially to windows.
I'm facing an issue in my current electron application where the frontend is written in angular and we are providing default path information about the i18n resources i.e. 'en.json' where we are trying to access the files through
assets/i18n
folder. It causes the internationalization being broken and only shows the keys instead of values. When I'm building locally its able to find the resources without any problems. During building to windows with NSIS, I got that its creating an app.asar archive that will contain all my bundled code regarding angular and electron aswell. Since I've installed the application is still looking for the same path, and the files are there in the given path, but seems like it cannot identify the json format inside the asar, so I modified the configuration in my app to build the resource files outside of the app.asar. But now I'm stuck with two things: