Angular's i18n is great, and tools like ng-packagr makes component library packaging extremely easy, but can they be combined?
What if i want to package and distribute a component library having translatable components? Is it possible? How do I package such a library? Will translation files be shipped together with the package, or should they be defined in the main app?
It'd be great if someone could point me at some doc. Thanks
Angular Internationalizationlink Internationalization, sometimes referenced as i18n, is the process of designing and preparing your project for use in different locales around the world. Localization is the process of building versions of your project for different locales.
Internationalization, or i18n (18 is the number of letters between i and n), is the process of building your product to support multiple languages. This can include separating your text from your code and using a library to format your dates based on different countries and time zones.
When you generate a translation file for the main app with the CLI (with ng xi18n
), elements with the attribute i18n in the library are imported in the translation file. You can then define the translations in the main app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With