- Source:
Classes
Namespaces
Members
(static) getElement
- Source:
- Deprecated:
- Yes
- See:
Get a HTML element associated to a container div. Defaults to local one.
(static) ImageFactory
- Source:
- See:
dwv.image.Image factory. Defaults to local one.
(static) logger
- Source:
- See:
Main logger namespace. Defaults to the console logger.
(static) openRoiDialog
- Source:
- See:
Open a dialogue to edit roi data. Defaults to undefined.
(static) prompt
- Source:
- See:
Prompt the user for some text. Defaults to local one.
(static) ViewFactory
- Source:
- See:
dwv.image.View factory. Defaults to local one.
Methods
(static) getVersion() → {string}
- Source:
Get the version of the library.
Returns:
The version of the library.
- Type
- string
(static) i18n(key, options) → {string}
- Source:
Get the translated text.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key to the text entry. |
options |
object | The translation options such as plural, context... |
Returns:
The translated text.
- Type
- string
(static) i18nExists(key, options) → {boolean}
- Source:
Check the existence of a translation.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key to the text entry. |
options |
object | The translation options such as plural, context... |
Returns:
True if the key has a translation.
- Type
- boolean
(static) i18nGetFallbackLocalePath(filename) → {string}
- Source:
Get the current locale resource path. Warning: to be used once i18next is initialised.
Parameters:
Name | Type | Description |
---|---|---|
filename |
string | The file to locate. |
Returns:
The path to the locale resource.
- Type
- string
(static) i18nGetLocalePath(filename) → {string}
- Source:
Get the current locale resource path. Warning: to be used once i18next is initialised.
Parameters:
Name | Type | Description |
---|---|---|
filename |
string | The file to locate. |
Returns:
The path to the locale resource.
- Type
- string
(static) i18nInitialise(language, localesPath)
- Source:
Initialise i18n.
Parameters:
Name | Type | Description |
---|---|---|
language |
string | The language to translate to. Defaults to 'auto' and gets the language from the browser. |
localesPath |
string | Path to the locales directory. |
(static) i18nInitialiseWithResources(language, resources)
- Source:
Initialise i18n with recources as input.
Parameters:
Name | Type | Description |
---|---|---|
language |
string | The language to translate to. Defaults to 'auto' and gets the language from the browser. |
resources |
object | Languages provided as object. |
(static) i18nOffFailedLoad()
- Source:
Stop handling i18n failed load event.
(static) i18nOffInitialised()
- Source:
Stop handling i18n load event.
(static) i18nOnFailedLoad(callback)
- Source:
Handle i18n failed load event.
Parameters:
Name | Type | Description |
---|---|---|
callback |
object | The callback function to call when i18n is loaded. It can take three arguments: lng, ns and msg. |
(static) i18nOnInitialised(callback)
- Source:
Handle i18n 'initialized' event.
Parameters:
Name | Type | Description |
---|---|---|
callback |
object | The callback function to call when i18n is initialised. It can take one argument that will be replaced with the i18n options. |
(static) i18nPage()
- Source:
Translate all data-i18n tags in the current html page. If an html tag defines the data-i18n attribute, its value will be used as key to find its corresponding text and will replace the content of the html tag.