O'Reilly logo

Dart: Scalable Application Development by Ivo Balbaert, Sergey Akopkokhyants, Davy Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extracting messages

Now, we have all the messages separated from the UI and we are ready for translation. We need to extract them from the source code into the external file with a special program called extract_to_arb.dart from the intl package, as shown in the following code:

pub run intl:extract_to_arb --output-dir=web web/registration_form.dart

The preceding program generates the intl_messages.arb file inside the specified web directory. This file contains all the messages in the ARB format. ARB is a localization resource format based on JSON. This format provides the following benefits:

  • Simplicity: This format is simple and human-readable because it is based on JSON
  • Extensibility: In this format, vocabulary can be added without affecting the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required