Bird
0
0

Which combination of steps is correct?

hard📝 state output Q15 of 15
Wordpress - Custom Theme Development
You want to make your WordPress theme fully translation-ready. Which combination of steps is correct? A) Wrap all user-facing strings with _e() or __(), load text domain in after_setup_theme, and place translation files in /languages folder. B) Use _e() only, load text domain in init hook, and place translation files in theme root. C) Wrap strings with __(), load text domain in wp_loaded hook, and place translation files in /lang folder. D) Use _e() and __() without loading text domain, place translation files anywhere.
AWrap strings with __(), load text domain on wp_loaded, store files in /lang
BUse _e() only, load text domain on init, store files in theme root
CWrap strings with _e() or __(), load text domain on after_setup_theme, store files in /languages
DUse _e() and __() without loading text domain, store files anywhere
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct translation function usage

    Both _e() and __() should be used to wrap user-facing strings for translation.
  2. Step 2: Confirm proper hook and folder for translations

    Text domain must be loaded on after_setup_theme hook, and translation files should be stored in a /languages folder inside the theme.
  3. Final Answer:

    Wrap strings with _e() or __(), load text domain on after_setup_theme, store files in /languages -> Option C
  4. Quick Check:

    Correct functions + hook + folder = Wrap strings with _e() or __(), load text domain on after_setup_theme, store files in /languages [OK]
Quick Trick: Use _e()/__(), after_setup_theme hook, and /languages folder [OK]
Common Mistakes:
  • Loading text domain too late or not at all
  • Placing translation files outside /languages folder
  • Using only one translation function incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes