question

giorgiotino avatar image
giorgiotino asked

How can I make Push Notifications Template languages work?

Hello,

I have set up push notification for both iOS and Android and everything works fine. I am using templates and I was trying to add more Languages (default for me is English) but no matter how my devices are set up I always get the default language in the push notifications I receive.

e.g. I have added Italian and I have sent a push notification to an Italian iPhone (Device language and preferred language IS Italian) but I still get the English text.

Is there any additional setup I am missing, maybe on my device, on my app or on PlayFab on order to receive the push notifications in the right language?

Thanks!

Push Notifications
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

>> Is there any additional setup I am missing, maybe on my device, on my app or on PlayFab on order to receive the push notifications in the right language?

You need to set the player’s profile language on PlayFab. You can navigate to [Game Manager]->[Players], click the specific Player Id, then modify the title player account’s language on the [Player Overview] page. Or you can also set the language for the specific title player via this Entity API SetProfileLanguage. If you want to learn about all valid language codes that can be used in the Language field, you can call this Entity API GetLanguageList to get them.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

giorgiotino avatar image giorgiotino commented ·

That's great, works as expected. Only, looks like there is no way to retrieve the current preferred language without explicitly call GetProfile() API. I wish there was a way to get it along the Login response by setting a flag in the InfoRequestParameters. I would like to avoid making another API call at startup just to retrieve this info, especially because any other info on that page is returned except the default Language.

Is there a reason for not returning that info as well?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.