Ajith M A
Ajith M A

Reputation: 5348

Adding translations in Firebase push notifications

I am trying to localise the Push notifications that i receive on my Android/iOS device using Firebase notifications. I see an option in console to filter language, but i couldn't find any documentation pointing as to how i can use it? I need to know two things.

  1. How can i add a new language to the list?
  2. How can i handle this on device or is it handled automatically based on device language?

I have tried the following options.

  1. Changing the device language and subscribing to a topic.
  2. Adding a language suffix to the topic subscribed as - "userloggedin-fr"

But the above two options doesn't seem to work. I do not need to handle this manually using an additional key in payload. Can someone guide me how can i use the default option in console? I am including below a screenshot of my console right now. I am not sure how the "Spanish" got added into the list.

enter image description here

Upvotes: 1

Views: 2018

Answers (2)

Adam Ri
Adam Ri

Reputation: 517

I can't tell you how to manage that on app side, but I can tell you how to get more languages to the list on firebase console. Firebase recognizes your app and the device language automatically and adds it to the list. So if your app is used by a user in a foreign country with a different language it is added automatically to your console.

Upvotes: 1

Stanislav Bondar
Stanislav Bondar

Reputation: 6245

You just misunderstood this field. As oficial docs says

You can target user segments based on app, app version, language or user properties in ways that are not available using the to field in the server API.

So it's not the message language. It is group target based on app language

Upvotes: 0

Related Questions