Namespace ilib
Version
"11.0.006".
The global namespace that contains general ilib functions useful
to all of ilib
Defined in: ilib-full-dyn.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
<static> |
ilib.data
Place where resources and such are eventually assigned.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
ilib.bind(scope, method)
If Function.prototype.bind does not exist in this JS engine, this
function reimplements it in terms of older JS functions.
|
<static> |
ilib.clearPseudoLocales()
Reset the list of pseudo locales back to the default single locale of zxx-XX.
|
<static> |
ilib.extend(object1, object2)
Extend object1 by mixing in everything from object2 into it.
|
<static> |
ilib.getLoader()
Return the custom Loader instance currently in use with this instance
of ilib.
|
<static> |
ilib.getLocale()
Return the default locale for all of ilib if one has been set.
|
<static> |
ilib.getTimeZone()
Return the default time zone for all of ilib if one has been set.
|
<static> |
ilib.getVersion()
Return the current version of ilib.
|
<static> |
ilib.isArray(object)
Test whether an object in an javascript array.
|
<static> |
ilib.isDynCode()
Return true if this copy of ilib is using dynamically loaded code.
|
<static> |
ilib.isDynData()
Return true if this copy of ilib is using dynamically loaded locale data.
|
<static> |
ilib.setAsPseudoLocale(localename)
Sets the pseudo locale.
|
<static> |
ilib.setLoaderCallback(loader)
Set the custom loader used to load ilib's locale data in your environment.
|
<static> |
ilib.setLocale(spec)
Sets the default locale for all of ilib.
|
<static> |
ilib.setTimeZone(tz)
Sets the default time zone for all of ilib.
|
Field Detail
<static>
ilib.data
Place where resources and such are eventually assigned.
Method Detail
<static>
{function(...)|undefined}
ilib.bind(scope, method)
If Function.prototype.bind does not exist in this JS engine, this
function reimplements it in terms of older JS functions.
bind() doesn't exist in many older browsers.
- Parameters:
- {Object} scope
- object that the method should operate on
- {function(...)} method
- method to call
- Returns:
- {function(...)|undefined} function that calls the given method in the given scope with all of its arguments properly attached, or undefined if there was a problem with the arguments
<static>
ilib.clearPseudoLocales()
Reset the list of pseudo locales back to the default single locale of zxx-XX.
<static>
{Object}
ilib.extend(object1, object2)
Extend object1 by mixing in everything from object2 into it. The objects
are deeply extended, meaning that this method recursively descends the
tree in the objects and mixes them in at each level. Arrays are extended
by concatenating the elements of object2 onto those of object1.
- Parameters:
- {Object} object1
- the target object to extend
- {Object=} object2
- the object to mix in to object1
- Returns:
- {Object} returns object1
<static>
{ilib.Loader|undefined}
ilib.getLoader()
Return the custom Loader instance currently in use with this instance
of ilib. If there is no loader, this method returns undefined.
- Returns:
- {ilib.Loader|undefined} the loader instance currently in use, or undefined if there is no such loader
<static>
{string}
ilib.getLocale()
Return the default locale for all of ilib if one has been set. This
locale will be used when no explicit locale is passed to any ilib
class. If the default
locale is not set, ilib will attempt to use the locale of the
environment it is running in, if it can find that. If not, it will
default to the locale "en-US".
- Returns:
- {string} the locale specifier for the default locale
<static>
{string}
ilib.getTimeZone()
Return the default time zone for all of ilib if one has been set. This
time zone will be used when no explicit time zone is passed to any ilib
class. If the default time zone
is not set, ilib will attempt to use the locale of the
environment it is running in, if it can find that. If not, it will
default to the the zone "local".
- Returns:
- {string} the default time zone for ilib
<static>
{string}
ilib.getVersion()
Return the current version of ilib.
- Returns:
- {string} a version string for this instance of ilib
<static>
{boolean}
ilib.isArray(object)
Test whether an object in an javascript array.
- Parameters:
- {*} object
- The object to test
- Returns:
- {boolean} return true if the object is an array and false otherwise
<static>
{boolean}
ilib.isDynCode()
Return true if this copy of ilib is using dynamically loaded code. It returns
false for pre-assembled code.
- Returns:
- {boolean} true if this ilib uses dynamically loaded code, and false otherwise
<static>
{boolean}
ilib.isDynData()
Return true if this copy of ilib is using dynamically loaded locale data. It returns
false for pre-assembled data.
- Returns:
- {boolean} true if this ilib uses dynamically loaded locale data, and false otherwise
<static>
ilib.setAsPseudoLocale(localename)
Sets the pseudo locale. Pseudolocalization (or pseudo-localization) is used for testing
internationalization aspects of software. Instead of translating the text of the software
into a foreign language, as in the process of localization, the textual elements of an application
are replaced with an altered version of the original language.These specific alterations make
the original words appear readable, but include the most problematic characteristics of
the world's languages: varying length of text or characters, language direction, and so on.
Regular Latin pseudo locale: eu-ES and RTL pseudo locale: ps-AF
- Parameters:
- {string|undefined|null} localename
- the locale specifier for the pseudo locale
<static>
{boolean}
ilib.setLoaderCallback(loader)
Set the custom loader used to load ilib's locale data in your environment.
The instance passed in must implement the Loader interface. See the
Loader class documentation for more information about loaders.
- Parameters:
- {ilib.Loader} loader
- class to call to access the requested data.
- Returns:
- {boolean} true if the loader was installed correctly, or false if not
<static>
ilib.setLocale(spec)
Sets the default locale for all of ilib. This locale will be used
when no explicit locale is passed to any ilib class. If the default
locale is not set, ilib will attempt to use the locale of the
environment it is running in, if it can find that. If not, it will
default to the locale "en-US". If a type of parameter is string,
ilib will take only well-formed BCP-47 tag
- Parameters:
- {string|undefined|null} spec
- the locale specifier for the default locale
<static>
ilib.setTimeZone(tz)
Sets the default time zone for all of ilib. This time zone will be used when
no explicit time zone is passed to any ilib class. If the default time zone
is not set, ilib will attempt to use the time zone of the
environment it is running in, if it can find that. If not, it will
default to the the UTC zone "Etc/UTC".
- Parameters:
- {string} tz
- the name of the time zone to set as the default time zone