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
383 stars 115 forks source link

[Bug]: Can't initialize OneSignal for slovenian users #1156

Open jozeblackblox opened 5 months ago

jozeblackblox commented 5 months ago

What happened?

If the system language in browser (and also in Cordova SDK) is set to slovenian, OneSignal cannot be initialized.

Same problem, different language was solved on issue: OneSignal/react-native-onesignal/issues/1568

@nan-li please update your server to accept slovenian language ( sl )

What browsers are you seeing the problem on?

Firefox, Chrome (Chromium), Microsoft Edge

What operating system are you running?

Windows 11 23H2

Steps to reproduce?

Set system/browser language to slovenian, then simply try init:

OneSignal.init({
    appId: XXXXXXXXXXXXX,
});

What did you expect to happen?

It should login the user on URL /apps/$APP_ID/users with "language":"sl" but instead error 400 is returned.

Relevant log output

{"errors":[{"title":"The provided language value is not a supported ISO 639-1 value"}]}