0
0
Angularframework~5 mins

Marking text for translation in Angular - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Ang-translate
Bi18n
Ctranslate
Dlocalize
How do you mark the placeholder text of an input element for translation?
AAdd <code>i18n</code> to the input element
BUse <code>ng-translate-placeholder</code>
CWrap placeholder in <code>&lt;translate&gt;</code> tags
DAdd <code>i18n-placeholder</code> attribute
What happens to text marked with i18n during Angular's build process?
AIt is ignored
BIt is removed from the app
CIt is extracted for translation and replaced with translated text
DIt is converted to uppercase
Why might you add a description or meaning to an i18n attribute?
ATo help translators understand context
BTo disable translation
CTo make the text bold
DTo style the text
Which of these is NOT a valid way to mark text for translation in Angular?
AUsing <code>translate</code> attribute
BUsing <code>i18n-placeholder</code> for placeholders
CUsing <code>i18n</code> attribute
DAdding meaning and description in <code>i18n</code> attribute
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.