Application Development53% of the exam

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.

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.

~7 min read · 13 practice questions ·

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

Recommended approach
Detail
One template set; translate the resource bundles
Missing key, null default
Detail
Resource.msg returns the key itself
Null key
Detail
Resource.msg throws an exception
Bundle search
Detail
Per key, cartridge by cartridge along the site path
Properties encoding
Detail
UTF-8; Unicode escapes supported
Static file fallback
Detail
Per file: locale folder, then default
Localized form structure
Detail
Same-named definition in a locale folder beside forms/default
Configured fallback scope
Detail
PersistentObject attributes only
Fallback disabled, no value
Detail
Nothing is returned
Custom object localizable attributes
Detail
Deprecated
Country codes
Detail
ISO 3166-1 alpha-2 only
Sources for this section (4)
  • 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?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the B2C Commerce Developer pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 28 lessons of the B2C Commerce Developer guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Practice exams purchase adds inline bank questions and topic practice (13 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Choose guide-only, practice-only, or save $4 with both

Practice for the B2C Commerce Developer exam