Headless 360Intermediatei18nlocalizationapi
Handle locale and translation in headless API responses
Real World Scenario
Product descriptions return English only despite CMS translations existing for 12 locales.
Expected Answer
• Accept-Language header or locale query param on all content APIs
• CMS delivery filtered by locale with fallback chain
• Commerce product attributes localized per market catalog
• Currency and date formatting server-side or documented client contract
• Cache per locale preventing cross-locale pollution
• Test fallback when translation missing
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Direct answer: Accept-Language header or locale query param on all content APIs Also consider: CMS delivery filtered by locale with fallback chain In practice: Commerce product attributes localized per market catalog Balance speed of delivery with maintainability.
Architect Perspective
i18n is API contract concern—locale must be first-class parameter, not afterthought.