Bird
0
0

How can you ensure an Angular app supports both English and Spanish using i18n?

hard📝 Conceptual Q8 of 15
Angular - Internationalization and Accessibility
How can you ensure an Angular app supports both English and Spanish using i18n?
AWrite all text in English and rely on browser auto-translation.
BUse CSS to hide English text and show Spanish text manually.
CCreate translation files for Spanish and configure Angular to load them based on user language.
DDuplicate the app codebase with Spanish text hardcoded.
Step-by-Step Solution
Solution:
  1. Step 1: Understand i18n multi-language support

    Angular uses translation files per language and loads them dynamically.
  2. Step 2: Identify correct approach for English and Spanish

    Creating Spanish translation files and configuring Angular to load them is the proper method.
  3. Final Answer:

    Create translation files for Spanish and configure Angular to load them based on user language. -> Option C
  4. Quick Check:

    Multi-language support = translation files + config [OK]
Quick Trick: Use translation files for each language [OK]
Common Mistakes:
  • Relying on browser translation
  • Hardcoding multiple languages in code

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes