Custom Multilingual Push Notification Templates
RC supports multilingual push notifications through the Push Notification Template feature. The server will match the corresponding language content from the specified push template based on the push language reported by the App user via the client, and deliver remote push notifications accordingly.
- Starting from version 5.0.0, the client SDK supports specifying a push template when sending messages.
- App users need to set their preferred push notification language via the client SDK. Otherwise, the server will default to using the Push Language setting at the App Key level to match push content.
Creating Multilingual Push Notification Templates
Before using the Push Notification Template feature, you must create multilingual push templates in the RC Console.
-
Navigate to the Custom Push Content page in the Console to create push templates. A maximum of 100 templates can be created.
- Template ID: The unique identifier for the push template. When sending messages using this template, this ID must be specified.
- Template Name: The name of the push template.
- Push Content Configuration: Each push template supports multiple language configurations, with each language corresponding to one push title and one push content.
-
Add push content. You can configure the corresponding push title and content for each Language Identifier. For example, template
asiacan simultaneously include content for zh_CN, zh_TW, zh_HK, ja_JP, ko_KR, and other languages.- Language Identifier: Select a language identifier from the dropdown menu, such as en_US, to add content for that language.
- Push Title: Set the notification title for the corresponding language (optional). By default, one-to-one chats display the username, while group chats and ultra groups display the group name. Note that any push title specified when sending a message will override the title set in the template.
- Push Content: Set the notification content for the corresponding language. Note that any push content specified when sending a message will override the content set in the template.
New templates take effect after 15 minutes.
Using Custom Push Templates
The client SDK supports specifying a template ID (templateId) in the MessagePushConfig of message push attributes when sending messages, enabling the specified multilingual push template for the message. If the message triggers a push notification, the server will use the multilingual content from the specified push template for delivery.
If the recipient's client has set a push language, the server will match the user-reported push language from the template. If the user hasn't set a language or if no match is found, the server will use the default push language content configured for the App in RC services.
The language identifier set by the client SDK must match the console's language identifier for successful matching. For example, if the client sets the push language as en-US (American English) but the template uses en_US, the match will fail.
- For details on how to specify a push template ID (
templateId), see Configuring Message Push Attributes. Note: To use push templates, leave the push title and content fields empty in the Message Push Attributes. - For instructions on setting the push language on the client side, see User-Level Push Configuration > Push Language.
- You can modify the default push language configuration for your App Key in RC. Submit a ticket to request changes to the App Key-level Push Language if needed.