Localization

The Client-Side Framework handles a basic localization mechanism.

It looks for any data-g-loc attribute and translate the content of the owner element using the gwcLocalizedMessages dictionary located in the main.xhtml. The gwcLocalizedMessages dictionary can be expanded as needed. The Client-Side Framework exports a gwc.api.getMessage(msg) function to access translated messages based on the locale of the browser.

Example

alert( gwc.api.getMessage('network error') );