# Localization, multi-currency and time zones in code

*Platform Developer II Study Guide · Advanced Developer Fundamentals · Last updated October 16, 2026 · https://www.certifyforce.com/study-guide/platform-developer-ii/advanced-developer-fundamentals/localization-multi-currency-and-time-zones-in-code*

How custom labels, toLabel(), CurrencyIsoCode, convertCurrency(), dated exchange rates and the Date, Datetime and LWC i18n APIs decide which language, currency, time zone and format your code returns to each user.

- Certification: Salesforce Platform Developer II
- Exam section: Advanced Developer Fundamentals
- Study guide: https://www.certifyforce.com/study-guide/platform-developer-ii

**Official exam objective:**

> Demonstrate knowledge of localization and multi-currency features and capabilities and how they affect coding.

## What the exam expects

- Reference a translated custom label from Apex, Lightning web components and Aura, and resolve a label in a language other than the running user's.
- Return translated picklist values from SOQL with `toLabel()` and locale-formatted values with `FORMAT()`.
- Predict the currency of a queried amount: the record's own currency, the user's currency through `convertCurrency()`, or the org's default currency for grouped aggregates.
- Know where dated exchange rates apply under advanced currency management and what to do in code where they don't.
- Pick the Date and Datetime method that applies the user's time zone and locale, or GMT, and format numbers and currency in LWC from the user's Salesforce locale.

Key terms: **custom label** (translatable text value referenced from code), **CurrencyIsoCode** (the field that sets the currency of every amount on a record), **corporate currency** (the headquarters currency that conversion rates are relative to), **advanced currency management** (dated exchange rates mapped to date ranges), **context user** (the user whose time zone, locale and language the methods apply).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Custom label limits | Up to 5,000 per org (managed-package labels excluded), 1,000 characters each | [Custom Labels](https://help.salesforce.com/s/articleView?id=platform.cl_about.htm&type=5) |
| `Label.get('', name, lang)` | Empty namespace means the org namespace; overrides the user's language | [Label Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_System_Label.htm) |
| Changing CurrencyIsoCode | Amounts keep their number and show the new code | [Manage Multiple Currencies](https://help.salesforce.com/s/articleView?id=sales.admin_currency.htm&language=en&type=5) |
| `convertCurrency()` in WHERE | Error; use an ISO-code literal such as `USD5000` | [convertCurrency()](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_querying_currency_fields.htm) |
| Aggregates with GROUP BY or HAVING | Returned in the org's default currency | [convertCurrency()](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_querying_currency_fields.htm) |
| Dated exchange rates | Opportunity-family objects and their reports only; not Currency formulas | [About Advanced Currency Management](https://help.salesforce.com/s/articleView?id=sales.administration_about_advanced_currency_management.htm&type=5) |
| `UserInfo.getDefaultCurrency()` | User's currency in multi-currency orgs, org currency otherwise | [UserInfo Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_userinfo.htm) |
| `Datetime.valueOfGmt(str)` | Expects `yyyy-MM-dd HH:mm:ss` in GMT | [Datetime Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_datetime.htm) |
| `Date.toStartOfWeek()` | Depends on the user's locale: Sunday (US), Monday (Europe) | [Date Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_date.htm) |

## Check yourself

- Why does `System.Label.Shipment_Delayed` return English in a scheduled job that emails French contacts?
- When do you query `DatedConversionRate` yourself instead of relying on `convertCurrency()`?
- Why can't a Visualforce page show Opportunity `Amount` with `<apex:outputField>` under advanced currency management?
- What does `WHERE Amount > 50000` without an ISO code compare?

## Sources

- [Manage Multiple Currencies](https://help.salesforce.com/s/articleView?id=sales.admin_currency.htm&language=en&type=5)
- [convertCurrency()](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_querying_currency_fields.htm)
- [About Advanced Currency Management](https://help.salesforce.com/s/articleView?id=sales.administration_about_advanced_currency_management.htm&type=5)
- [DatedConversionRate](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_datedconversionrate.htm)
- [UserInfo Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_userinfo.htm)
- [Custom Labels](https://help.salesforce.com/s/articleView?id=platform.cl_about.htm&type=5)
- [Label Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_System_Label.htm)
- [Access Labels](https://developer.salesforce.com/docs/platform/lwc/guide/create-labels.html)
- [Using Labels](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/labels_intro.htm)
- [toLabel()](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_tolabel.htm)
- [Datetime Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_datetime.htm)
- [Date Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_date.htm)
- [Access Internationalization Properties](https://developer.salesforce.com/docs/platform/lwc/guide/create-i18n.html)
- [Formatted Number](https://developer.salesforce.com/docs/component-library/bundle/lightning-formatted-number/documentation)
- [Using the runAs Method](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_tools_runas.htm)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 15 linked practice questions, and unlimited timed mock exams are included with the Platform Developer II pack (USD $19): https://www.certifyforce.com/practice-exams
