-
Notifications
You must be signed in to change notification settings - Fork 195
Notification Localization #808
Comments
At least in iOS, it looks like there is a solution: you can pass multiple strings for various languages along with the notification payload. Then the notification will be shown in the language of the device. I.e. if user's phone is set to Chinese, they see notification in chinese. If set to English, they see in English. In all ways this seems preferable to storing a language preference on-server. See Send a localization string with the notification payload headline in this SO anser: Looking into Android, though I'd wager they have something similar... EDIT: Seems same option is available on Android: https://stackoverflow.com/a/14958764 |
Related: #760 🌐 |
@tomlinton See my post above for info on l10n for iOS and Android mobile. @micahalcorn -- wasn't this issue assigned to Tom yesterday? Happy to do it, but want to be clear. |
Yes, updated @wanderingstan ☑️ |
Taking this off of @tomlinton's plate 🍽 |
be0d17a adds a handful of English strings for the offer-related events that we convert to push notifications. These should be translated.
There are complications:
Our existing localization code lives in origin-dapp (on the client). These strings live on the server, as (probably) should the translated versions. If so, we will need to store the user's selected language at the time that she creates a subscription and then potentially need to update it each time the language selection is changed. 😬 The notification strings never arrive in the DApp itself, so we can't handle them there. If we wanted to rely solely on the browser's selected language at the time that the notification is displayed, we could theoretically access
navigator.language
from the service worker. But this may not work.If the strings live in the service worker or on the server, we would need a way to get them into CrowdIn. There has been some talk with @wanderingstan about having a dictionary of string IDs that could be shared by all apps within the monorepo.
The text was updated successfully, but these errors were encountered: