If you extend a Commerce Store Accelerator module, you may also need to extend its translation resources. The translation resources should be placed in the extended module’s module_name
/src/main/web-app/locales
directory so they are copied to the proper location in the run-time store.war
file, as described in the Copying Source Translation Files during the Build Process section.
The HTML templates for cartridge renderers that belong to extended modules may need to distinguish between the namespace associated with the extended module and the namespace for the unextended module. For this case, the same process is used to calculate the extended module’s namespace and load its translation resource file. However, instead of loading the extended module’s namespace into the localeNamespace
property, the cartridge renderer view models load the namespace into an appLocaleNamespace
property. This allows the HTML template to request strings from the unextended module, using localeNamespace
, and strings from the extended module, using appLocaleNamespace
. For an example of this type of extension, see the RefinementMenu.js
and RefinementMenu.html
files in these locations:
Unextended module:
<ATG11dir>/CommerceAccelerator/Plugins/SearchAndNavigation/src/main/web-app
Extended module:
<ATG11dir>/CommerceAccelerator/Applications/B2CStore/Plugins/SearchAndNavigation/src/main/web-app
Notice that the RefinementMenu.html
in the extended module makes requests for strings from both the localeNamespace
and appLocaleNamespace
namespaces.