Search code examples
parse-platformlocalizationpush-notificationparse-cloud-code

Send localized push notification from cloud code


I see there is a way to localize push notifications that are sent from the web interface, but what is the best way to localize push notifications that are sent from cloud code (received on iOS and Android)?

I am thinking of just making a new 'Localization' object that contains columns for the key and each language, which I then query before sending push based on the language stored in the users installation, but thought there may be a standard way to do this that I am unaware of.


Solution

  • The solution I went with is to store the device language as a column in Installation, and create a new Localization class with Key, Language and Text columns, which is queried as required before I send the notification.

    Seems to work quite well, especially since you can upload .csv using old parse web interface.