Locale-specific template folders and lookup
Key Takeaway
B2C Commerce looks for a template first in the folder for the full request locale (such as de_AT), then in the folder for its language (de), then in default. Keep shared templates in default, and put a copy in a locale folder only for templates that differ for that locale.
B2C Commerce stores ISML templates in locale-named folders under each cartridge's templates directory, so a page can render from a different template for each locale. For each request, B2C Commerce uses the request's locale to find a matching template. When no locale-specific template exists, B2C Commerce falls back to the default folder. Salesforce recommends one shared template set with translated text in properties files, so keep locale folders for templates that truly must differ.
Where templates live
ISML templates are *.isml files stored in locale-specific folders under /cartridge/templates/. Each cartridge has its own templates directory. The /cartridge/templates/default folder holds the default locale. Each supported locale needs its own subdirectory under /templates/, called a locale folder.
/cartridge/templates/
default/
account/login.isml
checkout/cart.isml
home/homepage.isml
de/
home/homepage.isml
de_AT/
checkout/cart.ismlThe structure is templates/{locale_folder}/{template_files}. Every template must sit inside a subdirectory of templates, either default or a locale folder. A template stored directly in the templates directory itself is not allowed. Inside a locale folder, you can add subdirectories organized by area of functionality, such as account, checkout and home in the tree above.