What is the best practice for l10n and i18n for Angular project? What is the best practice for l10n and i18n for Angular project? angular angular

What is the best practice for l10n and i18n for Angular project?


Transloco is one of the more feature-rich and well-documented i18n/i10n solutions for Angular I've used.

I'm not sure why they removed the feature comparison from their README, but here they've outlined how it stacks up against other solutions.Some of the things that stand out from what you mentioned:

  • Language translations are lazy-loaded at runtime from static JSON assets. Thus, the application loads once and can switch languages on-the-fly.

    • Only one Angular project, so caching works just fine.
    • Users do not have to reload when switching language.
    • New languages are as simple as adding a new JSON file.
  • I18n and l10n support.

I don't know that there is a built-in solution for having the route include the current language. However, it's certainly doable. Here is a Stackblitz example.


(Side anecdote: Our team used to use ngx-translate, but migrated to Transloco over questions about ngx-translate's future.


For i18n, take a look at ngx-translate. I think it suits your needs.I do not know which option is best for l10n.