Localization

Localize messages and reach your global audience in their preferred languages without having to send independent messages for different languages.

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 take advantage of Airship's localization features when you:

  • Use the Message composer in the Airship dashboard when sending a message to your App and/or Web channels
  • Use the In-App Automation composer in the Airship dashboard.
  • Use the /push or /schedules APIs.

When adding localizations to your message, you will also create a Default message — a message that Airship sends to anybody in your audience who does not match the languages or localesThe combination of a language and country. A user's locale is determined by their device settings. that you specify in your message. 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.

 Tip

When sending a localized message, you can target specific users by localeThe combination of a language and country. A user's locale is determined by their device settings. to align your audience with your localizations. Matching your audience with your message's languages or locales ensures that your audience does not receive the default message.

Localization Support for App Messages

You can localize a message when you:

  • Use the Message composer in the Airship dashboard.
  • Use the /push or /schedules APIs with a localizations array in your request.

Airship's localization feature supports all app message types, including standard in-app messages and/or Message Center messages. The process to localize your message is much like creating any other message, except that you will repeat the Content step of the composer for each localization that you add to your message.

 Tip

When sending a message with localizations to app channels, you may want to use the Optimize or Delivery by Time Zone schedule options to make sure that users get their localized message at the time that best suits them.

See: Send a Localized Message.

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"
                }
            }
        ]
    }
}

Localization for In-App Automation

When localizing an In-App Automation, you will upload a CSV containing your language variants. Airship generates localized messages for each language or locale in your CSV. You can then preview and edit each localized message in the In-App Automation composer before you send your message.

Localization support for In-App Automation requires version 11 of Airship's iOS SDK, version 10 of Airshp's Android SDK, or later.

 Tip

For your convenience, Airship provides a sample CSV for download in the Content step when creating your message. When you upload custom HTML, the sample CSV file contains columns for data-ua-id-associated elements in your custom HTML.

See the In-App Automation Localization Tutorial for more information.

Localization Support for Web Messages

You can localize a message for Web channels when you:

  • Use the Message composer in the Airship dashboard.
  • Use the /push or /schedules APIs with a localizations array in your request.

The process to localize your message is much like creating any other message, except that you will repeat the Content step of the workflow for each localization that you add to your message. See: Send a Localized Message.

 Tip

When sending a message with localizations to your web audience, you may want to use the Delivery by Time Zone schedule option to make sure that your users get their localized message at the time that best suits them.

Example: Send a localized /push through 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"
            }
        }
    ]
}