# Localizing resource bundles, templates, forms and static files

*B2C Commerce Developer Study Guide · Application Development · Last updated November 3, 2026 · https://www.certifyforce.com/study-guide/b2c-commerce-developer/application-development/localizing-resource-bundles-templates-forms-and-static-files*

How Resource.msg and msgf find strings across cartridges and locales, how locale folders localize templates, form definitions and static files per file, and why the Business Manager locale fallback applies only to persistent object attributes.

- Certification: Salesforce B2C Commerce Developer
- Exam section: Application Development
- Study guide: https://www.certifyforce.com/study-guide/b2c-commerce-developer

**Official exam objective:**

> Given localization requirements, implement and enhance templates, form definitions, static files, properties files, and persistent object attributes to ensure that pages are displayed in the expected language.

## What the exam expects

- Externalize storefront text into properties files and predict what `Resource.msg` and `Resource.msgf` return, including across cartridges and for missing keys.
- Localize templates, form definitions and static files with locale folders, and know that the lookup works per file with a default fallback.
- Distinguish the configured locale fallback (persistent object attributes) from the cartridge file lookup (templates, forms, resource files, static content).
- Avoid encoding, country code and URL mistakes: UTF-8 properties files, ISO 3166-1 alpha-2 codes, locale-first URLs.
- Render an email template in a locale other than the request's.

Key terms: **resource bundle** (a set of `.properties` files with a common name under `templates/resources`); **locale folder** (a folder such as `fr_CA` next to `default` holding locale-specific files); **locale fallback** (the configurable chain, by default `en_US` to `en` to `default`, used for localizable object attributes); **localizable attribute** (a persistent object attribute with a value per locale); **template resource bundle** (the properties files SFRA's single template set reads its text from).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Recommended approach | One template set; translate the resource bundles | [Localization](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-localization.html) |
| Missing key, null default | `Resource.msg` returns the key itself | [Class Resource](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.web.Resource.html) |
| Null key | `Resource.msg` throws an exception | [Class Resource](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.web.Resource.html) |
| Bundle search | Per key, cartridge by cartridge along the site path | [Class Resource](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.web.Resource.html) |
| Properties encoding | UTF-8; Unicode escapes supported | [Class Resource](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.web.Resource.html) |
| Static file fallback | Per file: locale folder, then default | [Localization](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-localization.html) |
| Localized form structure | Same-named definition in a locale folder beside `forms/default` | [Forms](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-forms.html) |
| Configured fallback scope | PersistentObject attributes only | [Localization](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-localization.html) |
| Fallback disabled, no value | Nothing is returned | [Localization](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-localization.html) |
| Custom object localizable attributes | Deprecated | [Custom Objects](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-business-objects.html) |
| Country codes | ISO 3166-1 alpha-2 only | [Localization](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-localization.html) |

## Check yourself

- When does Business Manager refuse to delete a locale?
- Why does a single template set make translation safer?
- What does `Resource.msgf` do when null is passed for its arguments?
- Which bundle does `Resource.msg` read when `bundleName` is null?

## Sources

- [Localization](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-localization.html)
- [Class Resource](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.web.Resource.html)
- [Forms](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-forms.html)
- [Custom Objects](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-business-objects.html)

## About the full unit

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