We're building a progressive web-app that is able to receive notifications using the angular service worker.
Currently, the backend sends a notification using webpush to all notification subscribers, containing the message that is displayed. This works well, but we're having problems figuring out a way to internationalize this message so we can send notifications in the language that the app is set to.
The PWA is internationalized using i18n, and we are looking for a way for the PWA to specify the language of the notification.
One idea would be to transmit the notification message when the device subscribes, and save it for every registered subscriber in the backend. However, this would create a lot of duplicate/unneccesairy entries in our database.
Is there a good way to do this? It is possible to catch notifications, but I don't think angular can send out android push notifications with the translations itself.
Thanks a bunch!