The language of push notifications sent via Pushwoosh is determined by a Language tag associated with each device.
By default, our SDK assigns the device language as the Language tag. However, you may redefine it with setLanguage().
How the Language tag is set: the SDK detects the device's current language setting and updates the Language tag. This typically happens when the app launches for the first time, or when the app is brought from the background to the foreground.
There might be a short delay before the language change is registered by our servers after you update your device's language.
If notifications are in the old language: if you have recently changed your device's language and still receive notifications in the previous one:
- Completely close the application on your device.
- Wait for a couple of minutes.
- Relaunch the application.
This should trigger the SDK to update the Language tag with the new device language.
Using app-specific language settings: if your application lets users pick a language different from the device's system language, set the Language tag programmatically so notifications match the in-app choice.
Android:
Pushwoosh.getInstance().setLanguage("fr");
Passing null restores the automatic device-language behavior.
iOS (Swift):
Pushwoosh.sharedInstance().setLanguage("fr")
Use the appropriate two-letter language code for the language the user selected.
For SDK reference and integration details, see the iOS SDK documentation and the Android SDK documentation.
Comments
0 comments
Article is closed for comments.