Which of the following best explains why internationalization (i18n) is important in Angular applications?
Think about how apps reach users from different countries and languages.
Internationalization (i18n) helps Angular apps adapt to different languages and cultural norms, so more people can use them comfortably.
Consider an Angular component template with i18n attributes added to text elements. What is the main effect of adding these attributes?
<h1 i18n>Welcome to our app</h1> <p i18n>Enjoy your stay!</p>
Think about how Angular uses i18n to prepare text for different languages.
The i18n attribute marks text for extraction and translation, so Angular can swap it out for the right language version.
Which of the following Angular template snippets correctly uses the i18n attribute to mark a button label for translation?
Remember that i18n is an attribute without a value to mark content for translation.
The correct syntax is to add i18n as an attribute without a value on the element containing the text to translate.
Given an Angular app with i18n set up for English and Spanish, the default language is English. The template has:
<h2 i18n>Hello, user!</h2>
If the user switches the language to Spanish, what will the heading display?
Think about the Spanish translation of 'Hello, user!'.
When the language is switched to Spanish, Angular replaces the text with the Spanish translation 'Hola, usuario!'.
An Angular app uses i18n with multiple language files. The English version works fine, but when switching to French, the app shows the English text instead of French. Which is the most likely cause?
Check if the translation files are properly loaded and configured.
If the French translation file is missing or not included, Angular cannot replace the English text, so it defaults to English.