Once the value for the {{ns}} variable is determined, the i8n-loader calls the i18next.loadNamespace() function. This function completes the template path using the language cookie to replace the {{lng}} variable, resulting in a full path to the resource file, for example:

./bower_components/CSA.Plugins.Account/locales/translation_en.json

This file is then loaded and its resource strings are made available to the cartridge renderer’s HTML template. Note that the key for each string is pre-pended with the namespace of the module, so that the label for a Close button in one module can be distinguished from the label for a Close button in another module.


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices