Dojo uses Internationalization in all the official widgets under the dojo and dijit hierarchies. Only functionality in the experimental dojox hierarchy is exempt from I18N compliance.
Dojo uses specific JavaScript files for each function and language, so that it is comparatively simple to add translations and handling for locales which are not yet supported.
By setting the djConfig.locale
variable, you can change the look and feel of Dojos widgets to better conform with other locales than en_us.
All Dijits that have some kind of semantic responsibility can and will show different behavior when a locale other than default is set.
Under the dijit
folder in the Dojo directories, there's a folder called nls
. In this folder, Dojo has put JavaScript files containing an object literal with resource strings for the classes with the same names.
As an example, there's a file called loading.js
with the following content:
({ loadingState: "Loading...", errorState: "Sorry, an error occurred...