Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering DART
  • Table Of Contents Toc
Mastering DART

Mastering DART

By : Sergey Akopkokhyants
4.6 (5)
close
close
Mastering DART

Mastering DART

4.6 (5)
By: Sergey Akopkokhyants

Overview of this book

If you are an application developer who has experience with Dart and want to develop reusable and robust code in Dart, then this book is for you. You are expected to have a basic knowledge of core elements and applications.
Table of Contents (14 chapters)
close
close
13
Index

Using translated messages


Now, it's time to generate a set of Dart libraries that contain translated versions of our messages—one per locale from the ARB files prepared before. We use the generate_from_arb program from the intl package:

pub run intl:generate_from_arb --output-dir=web web/registration_form.dart web/translate_en.arb web/translate_de.arb

The program generates the message_de.dart, message_en.dart, and messages_all.dart files in the specified web directory. Each message_<locale_tag>.dart file contains the MessageLookup class that implements MessageLookupByLibrary. The MessageLookup class has a getter method localeName, a set of static functions that are returned translated on the specific locale text messages, and final constant messages that contain the name of all the static methods. The messages_all.dart file combines all the lookups in one place to make them available for the localization code from the Intl library. The single available public method of the message_all...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering DART
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon