Skip to content

[question]: v5 setLanguage not respected by notification #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
foramgmits opened this issue Oct 23, 2023 · 3 comments
Closed
1 task done

[question]: v5 setLanguage not respected by notification #770

foramgmits opened this issue Oct 23, 2023 · 3 comments

Comments

@foramgmits
Copy link

foramgmits commented Oct 23, 2023

How can we help?

OneSignal.User.setLanguage("en");

I've used this method setLanguage($languageCode).I want to know how it works because I've implemented this whenever user's application language changes but notification always triggered in default langauge '-en'.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nan-li
Copy link
Contributor

nan-li commented Jan 30, 2024

Hi @foramgmits,

Thank you for reaching out to us and I do apologize for the delay. If you are still seeking an answer to your question, setLanguage($languageCode), it attaches your designated language to the current user in the SDK.

I've implemented this whenever user's application language changes but notification always triggered in default langauge '-en'.

Can you tell me more about this issue you are running into?

  1. What version of the OneSignal Flutter SDK are you using?
  2. How are you sending the notification and setting languages?
  3. Does this user have the language set when you look at the record in the OneSignal dashboard?
  4. Is this affecting iOS, Android, or both?

@nan-li nan-li changed the title [question]: [question]: v5 setLanguage not respected by notification Jan 30, 2024
@jennantilla
Copy link
Contributor

Closing due to no response. @foramgmits if you are still having issues, please let us know!

@mohamedzakaria974
Copy link

Hi @nan-li @jennantilla it happens for me also with different real devices, simulators and emulators

  1. What version of the OneSignal Flutter SDK are you using?
    • latest onesignal_flutter: 5.3.0
  2. How are you sending the notification and setting languages?
    • we are sending notification using our backend using oneSignal endpoint https://onesignal.com/api/v1 with
    "en": "Title",
    "ar": "العنوان"
    

},
"contents": {
"en": "content",
"ar": "المحتوي"
}```
- setting language using await OneSignal.User.setLanguage("en"|"ar");
3. Does this user have the language set when you look at the record in the OneSignal dashboard?
- it was working, but suddenly stopped updating the language in user profile
4. Is this affecting iOS, Android, or both?
- both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants