/i18n-meetup

Demo code for presentation given to Tampa Bay Full Stack Meetup on 1/13/2021

Primary LanguageTypeScript

Angular i18n

  • Internationalization (i18n) is the process of designing and preparing your app to be usable in different locales around the world.
  • Localization (l10n) is the process of building versions of your app for different locales, including extracting text for translation into different languages, and formatting data for particular locales.
  • A locale identifies a region (such as a country) in which people speak a particular language or language variant. The locale determines the formatting and parsing of dates, times, numbers, and currencies as well as measurement units and the translated names for time zones, languages, and countries.

Angular i18n with Built-in Tools (abbreviated)

  1. ng add @angular/localize
  2. add i18n to any element that you would like translated
  3. extract into a translation file via ng extract-i18n
  4. create a copy of the translation file for each locale
  5. (optional) create a serve config for each locale
  • ng serve --configuration=en
  1. create build configuration for each locale
  2. configure server to serve appropriate locale

Angular i18n with Transloco

ng add @ngneat/transloco

reference