I'm sending FCM Push Notifications with Firebase Cloud Messaging, Cloud Functions and Flutter as framework. I'm searching since 3 hours for a solution to receive the background notifications with translations. I want to display the translation in the device language.
What I found are parameters like titleLocKey
and bodyLocKey
, but I can't find any way to use this parameters. Where in my project or on server environment I have to include this variables?
I fire the notification like this:
// Push Notification
const payload: admin.messaging.MessagingPayload = {
notification: {
title: "New User",
body: "A new user entered your platform",
badge: "1",
}
}
fcm.sendToDevice(userToken, payload);
Do you have any idea?