September 2017
Intermediate to advanced
450 pages
11h 24m
English
Sometimes, the labels in our application might change slightly based on the state of the application. Sometimes, we may wish to pluralize strings to show when there are multiple items, and singularize them when there is only one. For example, maybe we wanted Authors to be able to be displayed as Author if there is only one author for our blog. Luckily, there are options in Angular to pluralize strings with i18n.
<a class="nav-link" routerLink="/authors" i18n="People who write blog posts|Primary link to list of blog authors"> {authorCount, plural, =1 {Author} other {Authors}}</a>
Once exported, our /src/locale/messages.xlf file will be structured with a source reference listed as <x id="ICU"/>. This is actually a reference ...
Read now
Unlock full access