Localization

Localizing your messages helps you reach your audience with content specific to their language settings without creating separate messages for each language. Localization is supported for App and Web.

About localization

Airship’s localization feature provides a way to send a single message with multiple localizations. You can prepare localizations based on language information or LocaleThe combination of a language and country. A user’s locale is determined by their device settings. for more specific, regional localizations. Airship delivers localized messages to your audience according to language and country information gathered by the Airship SDK.

For example, if you prepared a German localization, users with their language set to German will receive the German localization of your message. If you want to make your message more regionally specific, you could add German localizations for both Germany and Austria. Users with their language preferences set to German would receive different messages depending on whether their country/region settings are set to Germany or Austria.


You can create localized content using:

  • The Message and In-App Automation composers.
  • The /push or /schedules APIs, with a localizations array in your request

All message types for the App channel are supported: push notifications, in-app messages, and Message Center messages. In the Message composer, you also have the option of selecting a content template.

Localization for In-App Automation includes support for Custom HTML messages.

This document is for the Message composer and APIs. See also: Localization for In-App Automation.

 Note

Localized push notifications do not generate a message report at this time. Message details are available in Performance AnalyticsA customizable marketing intelligence tool that provides access to reports and graphs based on engagement data. .

Create localized content

Follow these steps to create localized content for App and Web channels in the Message composer. The process is much like creating any other message, except that you will repeat the Content step for each localization that you add to your message.

First you will create a Default message — the message that Airship sends to anybody in your audience who does not match the languages or locales that you specify in your localizations. The default message helps you reach your entire audience even if you aren’t able to translate your message into all of your audience’s possible languages.

 Note

These steps cover enabling localization and adding content only.

In the Audience step, enable Localization:

In the Content step, select your message type, configure you default message, then add localized versions:

  1. If prompted, choose a message type or content template, then click Add Content. The message type screen appears depending on your selections in the Audience step.

  2. Configure your message content if you did not select a template. See Creating content for:

  3. When you have completed configuring the content for this message, click Add new.

  4. Select a language (required) and country (optional), click Save, and repeat the content configuration for the next localization.

Select from the dropdown menu to view content for each localization and edit as necessary. When you have finished adding localizations, click Delivery in the header and complete the rest of the steps in the composer.

 Tip

When sending a message with localizations to App or Web channels, you may want to use the OptimizeAn algorithm that determines the best hour for optimal engagement activity — when each individual member of your audience is most likely to receive and act on your message. iOS, Android, and Amazon platforms only. or Delivery By Time ZoneAn option for scheduled messages that delivers the messages according to recipient device’s current time zone. options to make sure that users get their localized message at the time that best suits them.

You can edit or delete a localized message while it is in draft state or until Airship has sent it.

  1. Go to Messages » Messages Overview.
  2. Find the message you want to edit or delete.
    •   = Edit
    •   = Delete

Send localized content using the API

Example: Send a localized /push using the Airship API by adding an array of localizations in your request.

POST /api/push HTTP/1.1
Authorization: Basic <master authorization string>
Accept: application/vnd.urbanairship+json; version=3
Content-Type: application/json

{
    "device_types": [ "web" ],
    "audience": {
        "tag": "needs_a_greeting",
        "group": "new_customer"
    },
    "notification": {
        "alert": "Hi!"
    },
    "localizations": [
        {
            "language": "de",
            "country": "AT",
            "notification": {
                "alert": "Grüss Gott"
            }
        },
        {
            "language": "de",
            "country": "DE",
            "notification": {
                "alert": "Guten Tag"
            }
        }
    ]
}

 Tip

When sending a message with localizations to your web audience, you may want to use the Delivery By Time ZoneAn option for scheduled messages that delivers the messages according to recipient device’s current time zone. option to make sure that your users get their localized message at the time that best suits them.

Example: Schedule a localized message to go out to your audience at their local time by adding localizations in a request to the /schedules API.

POST /api/schedules HTTP/1.1
Authorization: Basic <master authorization string>
Accept: application/vnd.urbanairship+json; version=3
Content-Type: application/json

{
    "schedule": {
        "local_scheduled_time": "2019-12-20T18:45:30"
    },
    "push": {
        "device_types": [ "android", "ios" ],
        "audience": {
            "tag": "needs_a_greeting",
            "group": "new_customer"
        },
        "notification": {
            "alert": "Hi!"
        },
        "localizations": [
            {
                "language": "de",
                "country": "AT",
                "notification": {
                    "alert": "Grüss Gott"
                }
            },
            {
                "language": "de",
                "country": "DE",
                "notification": {
                    "alert": "Guten Tag"
                }
            }
        ]
    }
}

 Tip

When sending a message with localizations to app channels, you may want to use the OptimizeAn algorithm that determines the best hour for optimal engagement activity — when each individual member of your audience is most likely to receive and act on your message. iOS, Android, and Amazon platforms only. or Delivery By Time ZoneAn option for scheduled messages that delivers the messages according to recipient device’s current time zone. options to make sure that users get their localized message at the time that best suits them.