OneSignal-Website-SDK icon indicating copy to clipboard operation
OneSignal-Website-SDK copied to clipboard

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

Open jozeblackblox opened this issue 5 months ago • 0 comments

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"}]}

jozeblackblox avatar Jan 22 '24 09:01 jozeblackblox