Recall & Review
beginner
What is the purpose of marking text for translation in Angular?
Marking text for translation tells Angular which parts of the app's text should be translated into different languages. It helps tools extract these texts for translators.
Click to reveal answer
beginner
How do you mark a simple text for translation in an Angular template?
You add the
i18n attribute to the HTML element containing the text, like <h1 i18n>Hello</h1>.Click to reveal answer
beginner
What is the role of the
i18n attribute in Angular templates?The
i18n attribute marks the element's content for translation extraction and replacement during the build process.Click to reveal answer
intermediate
How can you mark a placeholder text inside an input element for translation?
You add the
i18n-placeholder attribute to the input element, like <input placeholder="Name" i18n-placeholder>.Click to reveal answer
intermediate
Why is it important to provide a description or meaning with the
i18n attribute?Providing a description or meaning helps translators understand the context of the text, leading to better and accurate translations.
Click to reveal answer
Which attribute do you add to an HTML element to mark its text for translation in Angular?
✗ Incorrect
The
i18n attribute is the standard way in Angular to mark text for translation.How do you mark the placeholder text of an input element for translation?
✗ Incorrect
Angular uses
i18n-placeholder to mark placeholder text for translation.What happens to text marked with
i18n during Angular's build process?✗ Incorrect
Text marked with
i18n is extracted for translators and replaced with translated versions during build.Why might you add a description or meaning to an
i18n attribute?✗ Incorrect
Descriptions help translators know the context, improving translation quality.
Which of these is NOT a valid way to mark text for translation in Angular?
✗ Incorrect
The
translate attribute is not used by Angular for marking text for translation.Explain how to mark text and placeholders for translation in Angular templates.
Think about attributes added to HTML tags.
You got /3 concepts.
Why is marking text for translation important in Angular apps?
Consider the goal of internationalization.
You got /3 concepts.