Localizing Using Multiple Template Sets

You can use language-specific template sets to localize, although using one template set is the preferred approach.

With the multiple template set approach, each locale of a storefront has its own set of templates. The templates are stored in uniquely named folders, with this file structure:

templates>\<locale folder>\<template files>

By default, Salesforce B2C Commerce provides all templates within the \default folder. This folder is used when no template is found for the requested locale. Directory names for locale-specific templates consist of a language and a country code, as specified in the standard ISO 639 (language) and ISO 3166 (country).

This table shows some sample folder names:

Locale Folder Name
English/United States en_US
English/Ireland en_IE
German/Austria de_AT
Spanish/Argentina es_AR
French/Canada fr_CA

For example, templates could be stored in this directory structure:

.../cartridge/templates/default/multiple_template_files
.../cartridge/templates/en_GB/multiple_template_files
.../cartridge/templates/en_IE/multiple_template_files
.../cartridge/templates/en_US/multiple_template_files

Defaults

You can use the following defaults to represent general languages:

Language Folder Name
English en
German de
French fr
Spanish es