Localizely logo
  • Home
  • Getting started
  • How it works
  • Pricing
  • FAQ
Sign up

I18n questions · Flutter

How can I include a placeholder in a localization message in Flutter? 

You can use the ICU Message syntax to include placeholders. That will allow you to handle almost anything, from a simple text input to formatting numbers, dates, times, plurals, and other data types.

Localization message in arb file:

{
  "stringKeyExample": "Welcome {name}",
  "@stringKeyExample": {
    "placeholders": {
      "name": {}
    }
  }
}

Access the localization message in code:

AppLocalizations.of(context)!.stringKeyExample('John')

Note: Explore ICU messages using the ICU Message Editor.

Published Feb 1, 2023 · Last reviewed Oct 9, 2026 · Markdown version

Related Flutter internationalization questions:

Flutter internationalization tutorial:

Learn about internationalization in Flutter
Localizely logo
About
Free tools
Boring stuff
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
Newsletter
Copyrights 2026 © Localizely