How is your experience with the OutSystems Community?
18
Views
0
Comments
How to localize your ODC mobile app's home-screen name (iOS + Android)

If your ODC mobile app ships internationally, you've probably noticed something annoying: the name shown under the icon on the device home screen is fixed. A Portuguese user installing your app sees the same English name as everyone else. There's no native ODC property for this — displayName in the extensibility schema is a single string, not localizable.

The good news: ODC has a built-in mechanism that solves this cleanly, and it's the same mechanism for both iOS and Android. No plugin needed, no native code.

Here's how to make your icon read "Weather" on English devices, "Tempo" on Portuguese ones, "Clima" on Spanish ones, etc.

ODC's build actions — described  as "the modern replacement for Cordova hooks" — run after cap sync during the MABS build. They can write to Info.plist, .strings files, and Android resource files. We'll use:

  • iOS plist action — set CFBundleAllowMixedLocalizations = true (required, otherwise iOS silently ignores localized names)
  • iOS strings action — write App/<locale>.lproj/InfoPlist.strings with CFBundleDisplayName per locale
  • Android res action — create values-<locale>/strings.xml with both app_name and title_activity_main per locale

A note on Android: the Capacitor template's MainActivity references @string/title_activity_main for its label, not app_name. The activity's label is what the launcher shows on the home screen, so you need to override both string keys for it to work.

Step 1 — Create the buildAction.json resource

Save this as buildAction.json:

{

  "variables": {

    "APP_NAME_EN": { "type": "string", "default": "App" },

    "APP_NAME_PT": { "type": "string", "default": "App" }

  },

  "platforms": {

    "ios": {

      "plist": [

        {

          "replace": false,

          "entries": [

            { "CFBundleAllowMixedLocalizations": true }

          ]

        }

      ],

      "strings": [

        {

          "file": "App/en.lproj/InfoPlist.strings",

          "set": {

            "CFBundleDisplayName": "$APP_NAME_EN",

            "CFBundleName": "$APP_NAME_EN"

          }

        },

        {

          "file": "App/pt.lproj/InfoPlist.strings",

          "set": {

            "CFBundleDisplayName": "$APP_NAME_PT",

            "CFBundleName": "$APP_NAME_PT"

          }

        }

      ]

    },

    "android": {

      "res": [

        {

          "path": "values-en",

          "file": "strings.xml",

          "text": "\n\n    $APP_NAME_EN\n    $APP_NAME_EN\n\n"

        },

        {

          "path": "values-pt",

          "file": "strings.xml",

          "text": "\n\n    $APP_NAME_PT\n    $APP_NAME_PT\n\n"

        }

      ]

    }

  }

}

In ODC Studio:

  1. Open your mobile app module.
  2. Right-click Resources → Import Resource → select buildAction.json.
  3. With the resource selected, set Deploy Action = Deploy to Target Directory.

Step 2 — Add the extensibility configuration

In your mobile app → Edit app properties → Extensibility configurations, paste:

{

  "buildConfigurations": {

    "buildAction": {

      "config": "$resources.buildAction.json",

      "parameters": {

        "APP_NAME_EN": "Weather",

        "APP_NAME_PT": "Tempo"

      }

    }

  }

}

Replace "Weather" and "Tempo" with your actual localized names.

Step 3 — Build and test

  1. 1-Click Publish your mobile app.
  2. Trigger a new MABS build (iOS, Android, or both).
  3. Install the resulting IPA/APK on a real device.
  4. Change the device's system language (Settings → System → Languages).
  5. Reinstall the app. The home-screen label only refreshes on install or language change — restarting the app is not enough.
  6. The icon should now show the localized name.

Adding more locales

Add a APP_NAME_XX variable per locale you want. For each one, add:

  • An entry in the iOS strings array for App/xx.lproj/InfoPlist.strings
  • An entry in the Android res array with path: "values-xx"
  • The corresponding value in the consumer's parameters block

Languages you don't define fall back to your app's default name — you only ship the locales you actually need.

Regional variants

Locale
pt-BR
iOS folder
pt-BR.lproj
Android folder
values-pt-rBR
pt-PTpt-PT.lprojvalues-pt-rPT
zh-Hanszh-Hans.lprojvalues-zh (Android's locale system doesn't honor script tags cleanly)

When in doubt, use the plain two-letter code (en, pt, es).

Gotchas worth knowing

  • CFBundleAllowMixedLocalizations is required. Without it, iOS silently ignores per-locale CFBundleDisplayName. The plist action in the template handles this for you.
  • Android needs both app_name and title_activity_main. The Capacitor template uses title_activity_main for the activity label, which is what the launcher shows. The Application label (app_name) shows up in Settings → App info. Set both to avoid confusion.
  • The label only refreshes on install or language change. If you're testing the same device language across iterations, uninstall the app before reinstalling.

That's the whole pattern. Once you see the right strings in resources.arsc and the right .lproj folders in the .app, you're done — the OS handles the rest.

Hope this saves someone the day or two it took me to find that title_activity_main is the key Android's launcher actually reads. For O11 mobile apps, I made a plugin that's easy to use to accomplish the same results: Localized App Name Plugin

buildAction.json.zip
Localized App.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.