OneSignal / OneSignal-Website-SDK

OneSignal is a push notification service for web and mobile apps. This SDK makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com
Other
389 stars 115 forks source link

Introduce language functions on User model #1171

Open ElwynVdb opened 7 months ago

ElwynVdb commented 7 months ago

Description

This pull request introduces setLanguage and getLanguage on the user class + namespace, to set the language

Details

Systems Affected

Checklist

Validation

Benefits

Tests


This change is Reviewable

veewee commented 6 months ago

@jkasten2 / @rgomezp

Would this be something you are interested in merging?

It's a feature we want to use in our project:

When registering, the browser language is selected by default. However, we can tell from our user settings what language is preferred. There current workaround is to call the REST API manually instead of using a built-in SDK function.

Let us know if we can do anything to help you getting this into this repository.

(we provided a second PR on react-onesignal to have a wrapper in there as well : https://github.com/OneSignal/react-onesignal/pull/143)