Skip to main content
Pentaho Documentation

IService

pentaho.i18n.IService

The interface of localization AMD/RequireJS loader plugins.

This service allows loading a message bundle given its identifier as the AMD/RequireJS loader plugin parameter.

Message bundle identifiers have the general form of AMD/RequireJS module identifiers. When relative, the full message bundle identifier is resolved relative to the requesting module's parent module.

The following example loads the message bundle having the full identifier of foo.bar.

define(["pentaho/i18n!foo.bar"], function(msgBundle) { ... });

The following example loads the message bundle having the relative identifier of ./i18n/bar. Assuming the being defined module has the identifier my/component, the full identifier of the message bundle is my/i18n/bar.

define(["pentaho/i18n!./i18n/bar"], function(msgBundle) { ... });

Source: doc-js/pentaho/i18n/IService.jsdoc, line 17

See also:  pentaho.i18n.main

Extends

Methods

Name Description
load(name, require, onLoad, config)

Loads a logical module given its name.

normalize(name, normalize) : string

Normalizes the name of a logical module.

Methods Details

load(name, require, onLoad, config)

Loads a logical module given its name.

Source: doc-js/pentaho/IAmdLoaderPlugin.jsdoc, line 45

Inherited From: IAmdLoaderPlugin#load

Parameters:
Name Default Value Summary
name : string

The name of the logical module to load.

require : function

The contextual require function of the dependent module, if any, or the global require function, if requested using it.

onLoad : function

Callback function to call with the resolved module, once it is resolved.

config : object

The full AMD/RequireJS config object.

normalize(name, normalize) : string

Normalizes the name of a logical module.

Converts several names that refer to the same logical module to its canonical name, to ensure that the modules are recognized as being the same and are correctly cached.

This is an optional method.

Source: doc-js/pentaho/IAmdLoaderPlugin.jsdoc, line 59

Inherited From: IAmdLoaderPlugin#normalize

Parameters:
Name Default Value Summary
name : string

The name of the logical module to load.

normalize : function

The default normalize function.

Returns:
Name Description
string

The normalized logical module