Angular & Signals (283 Qs)•Part 8: Internationalization (i18n), Testing & DOM Directives (177 - 212)
What is the purpose of i18n attribute?
The Angular i18n attribute marks translatable content. It is a custom attribute, recognized by Angular tools and compilers. The compiler removes it after translation.
Note: Remember that i18n is not an Angular directive.
Practical Code Example
html
<!-- i18n attribute marks text for extraction into translation files (XLIFF): -->
<p i18n>Contact Support</p>