Functiondojo.i18n.getLocalization

dojo.require("dojo.i18n");
defined in dojo/i18n.js

Returns a hash containing name/value pairs in its prototypesuch that values can be easily overridden. Throws an exception if the bundle is not found. Bundle must have already been loaded by dojo.requireLocalization() or by a build optimization step. NOTE: try not to call this method as part of an object property definition (var foo = { bar: dojo.i18n.getLocalization() }). In some loading situations, the bundle may not be available in time for the object definition. Instead, call this method inside a function that is run after all modules load or the page loads (like in dojo.addOnLoad()), or in a widget lifecycle method.

Usage

function (/*String*/ packageName, /*String*/ bundleName, /*String?*/ locale) (view source)
parametertypedescription
packageNameStringpackage which is associated with this resource
bundleNameStringthe base filename of the resource bundle (without the ".js" suffix)
localeStringOptional. the variant to load (optional). By default, the locale defined by the host environment: dojo.locale