I have prepared applications with localized language versions. For this purpose I used the native Angular i18n module, which prepared two application packages with the appropriate language in each.
Each version of the application is available under the individual location on my nginx server:
- myapp.com/en/...
- myapp.com/pl/...
I would like my application to be installed once as PWA and provide both language versions using a (single?) service worker.
Unfortunately all I could do now with @angular/pwa module is to provide a separate service workers for each application, which forces separate installations of each language version of my application.
My question is: Is there any way for the application to work in the way I described using @angular/pwa or Workbox?
// By the way, it's a bit surprising that the creators of Angular didn't highlight the integration of @angular/localize with @angular/pwa.
ngx-translate
which would require changing the translating architecture. However, its translations are independent of the app and therefore you are able to cache all of them in one app instalation – Newlandindex.html
. Then, you need to create your own worker which will insert the right scripts on page load (you can't do it on go since JS code would be already loaded). This will load the appropriate app. And there you have your workers for each app included I guess – Newland