Skip to main content

Custom multi-language push notification templates

Nexconn supports multi-language push notifications through the Push Template feature. The server matches the push notification content to the language reported by the app user's client and delivers the remote push in that language.

tip
  • Client SDKs support specifying a push template when sending a message.
  • App users must set their push notification language via the client SDK. Otherwise, the server defaults to using the App Key-level Push notification language setting to match the push copy.

Create a multi-Language push template

Before using the Push Template feature, create a multi-language push template in the Nexconn console.

  1. Go to the Custom Push Copy page in the console to create push templates. You can create up to 100 templates.

    • Push Template ID: The unique identifier for the push template. Specify this ID when sending a message to use the template.
    • Push Template Name: The name of the push template.
    • Push Content Settings: Each template supports push content in multiple languages, with one push title and one push body per language.
  2. Add push content. Set the push title and body for each language using its Language Code. For example, a template named asia can include content for zh_CN, zh_TW, zh_HK, ja_JP, ko_KR, and other languages.

    • Language Code: Select a language code from the dropdown (such as en_US) to add the corresponding push copy.
    • Push Title: The notification bar title for the corresponding language. Optional — defaults to the user name for direct chats and the group name for group chats and super groups. Note that a push title specified at send time overrides the template title, so the template title will not take effect.
    • Push Body: The notification bar display content for the corresponding language. Note that push content specified at send time overrides the template body, so the template body will not take effect.

Templates take effect 15 minutes after creation.

Use a custom push template

The client SDK supports specifying a template ID (templateId) in the message push configuration MessagePushConfig when sending a message. When set, if the message triggers a push notification, the server delivers the notification using the multi-language content from the specified template.

If the recipient's client has set a push language, the server matches that language in the push template and delivers the remote push accordingly. If the user has not set a language, or if no match is found, the server uses the default push language configured for the app on the Nexconn server.

The language code set on the client SDK must exactly match the language code in the console template for a match to succeed. For example, if the client sets the push language to US English as en-US, but the template uses en_US for US English, the match will fail.

tip