LWCIntermediatei18nlocalizationcustom-labels
Architect LWC localization and internationalization
Real World Scenario
Global rollout requires LWCs in 8 languages but hardcoded strings block translation workflow.
Expected Answer
• Import labels from @salesforce/label/c.LabelName
• No string concatenation with word order assumptions—full sentence labels
• Format dates currency with lightning-formatted-number and locale-aware Apex
• RTL layout testing for Arabic Hebrew deployments
• Translation workbench exports labels for vendor translation
• Dynamic labels from Custom Metadata for admin-configurable text rare cases
• Test pseudo-localization catching truncation issues
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Direct answer: Import labels from @salesforce/label/c.LabelName Also consider: No string concatenation with word order assumptions—full sentence labels In practice: Format dates currency with lightning-formatted-number and locale-aware Apex Balance speed of delivery with maintainability.
Architect Perspective
i18n is day-one concern—extracting strings from 80 components post-build is expensive.