SF-PD2 User Interface Practice Question
A developer is tasked with internationalizing a Lightning Web Component that will be deployed globally. Which TWO Salesforce features should be used to handle locale-specific formatting and translations? (Choose TWO)
⚠ Common exam trap
Candidates often suggest hardcoding translations or using standard Apex, forgetting that LWC has specific 'i18n' modules and that Custom Labels are the standard for text localization.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
@salesforce/i18n import statements
Internationalization (i18n) in LWC involves both translating text and formatting data like dates or currencies. Salesforce provides built-in modules to access user preferences and custom translations. Using these features ensures that the UI remains consistent with the user's locale settings and provides a localized experience without hardcoding values or formats in the component.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
@salesforce/i18n import statements
Why this is correct
The @salesforce/i18n module provides access to locale-specific settings such as currency codes, date formats, and time zones. By importing these values, developers can use standard JavaScript Intl objects or framework utilities to format data correctly for every user, regardless of their geographical location or language settings.
- ✓
Translation Workbench and Custom Labels
Why this is correct
Custom Labels allow developers to store text strings that can be translated via the Translation Workbench. By referencing these labels in LWC via the @salesforce/label module, the framework automatically serves the version of the text that matches the user's language, facilitating easy multi-language support in the UI.
- ✗
Apex Schema.DescribeFieldResult labels
Why it's wrong here
While Apex can retrieve field labels, using it for general UI text is inefficient as it requires server-side calls. Custom Labels are specifically designed for UI internationalization and are cached on the client, providing much better performance and a cleaner separation of concerns between the metadata and the presentation layer.
- ✗
Hardcoded JSON files in Static Resources
Why it's wrong here
Storing translations in static resources makes maintenance difficult because it bypasses Salesforce's native Translation Workbench. This approach requires manual management of locales within the code, which is prone to errors and does not leverage the platform's built-in capabilities for managing multi-language content across different environments.
- ✗
Lightning Message Service (LMS)
Why it's wrong here
LMS is a communication tool used for passing messages between components on a page, regardless of the framework. It has no built-in functionality for handling translations or locale-based formatting. While it could theoretically pass translated strings, it is not an internationalization tool in itself.
About these practice questions
Courseiva writes every SF-PD2 question from scratch — 226 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Salesforce exam blueprint
This SF-PD2 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-PD2 exam.