Name | Returns | Comments |
---|---|---|
$.localise(package, settings) | - | Load in localised versions of specified JavaScript packages.package (string or string[]) is the name(s) of the
package(s) to loadsettings (object) to provide several settings
(see settings) or
is omitted to use the default language setting and parameters
|
$.localise(package, language, loadBase, path, timeout, async, complete) | - | Load in localised versions of specified JavaScript packages.package (string or string[]) is the name(s) of the
package(s) to loadlanguage , loadBase , path ,
timeout , async , complete (all optional)
see settings
Since 1.0.3 - language parameter only.Since 1.0.4 - parameters up to timeout .Since 1.1.0 - async and
complete parameters. |
$.localise.defaultLanguage | string | The default language set in the browser. Since 1.0.3 - previously it was $.defaultLanguage . |
$.localize(...) | - | A localisation of the $.localise function!Since 1.0.3. |
Name | Values | Default | Comments |
---|---|---|---|
language | string | browser setting | When specified, this value is used to drive the localisation process
rather than the
default browser language. It is the
RFC 4646 language-region
code and should be in the format aa or aa-AA .
For example: en = English, en-AU = Australian English. |
loadBase | boolean | false | When set to true , the base package (<package name>.js )
is loaded prior to any of the language override versions. |
path | string or string[2] | ['', ''] | The path or paths to the JavaScript files. If a single string is
provided it applies to both the base and localisations files.
If an array of two strings is given, the first is for the base file
and the second is for the localisations. Since 1.0.4. |
timeout | number | 500 | The timeout period for downloading the localisation packages. A value of 0 indicates no timeout. |
async | boolean | false | When set to true the localisations are loaded asynchronously.Since 1.1.0. |
complete | function | null | A callback that is triggered when the localisations have finished loading
(it only really applies when async is true ).
The function takes one parameter, being the name of the package loaded,
and has this set to the window .Since 1.1.0. |