Constructor
new MLTEngine(params)
Parameters:
Properties:
Name |
Type |
Description |
controller |
Help4.controller.Controller
|
|
domRefreshEngine |
Help4.engine.DomRefreshEngine
|
|
_started |
boolean
|
|
_domRefreshExecutor |
function
|
|
_onPanelEvent |
function
|
|
_targetLanguage |
string
|
|
_sourceLanguages |
Array.<string>
|
|
_preferredLanguage |
string
|
|
_languageMap |
Object
|
{en-US: ['de-DE', 'es-ES'], de-DE: ['en-US', 'es-ES'], ...} |
_translationActive |
boolean
|
|
_openBubbles |
Array.<Help4.engine.MLTEngine.Bubbles>
|
|
_activeBubble |
Help4.engine.MLTEngine.Bubbles
|
|
_translatedBubble |
Help4.engine.MLTEngine.Bubbles
|
|
_excludeBubble |
string
|
null
|
|
_translationAvailable |
boolean
|
|
_cache |
Object
|
{en: {id1: {translation: , original: }, id2: {}}, de: {id3: {...}, id4: {...}}} |
_xhrPromiseContainer |
Object
|
|
_xhrError |
boolean
|
|
- Source:
Extends
Members
TRANSLATION_STATES :Object
Type:
Properties:
Name |
Type |
Description |
success |
'success'
|
|
fail |
'fail'
|
|
partial |
'partial'
|
|
skipped |
'skipped'
|
|
- Source:
Methods
(protected) ____defineDataFunctions()
- Overrides:
- Source:
(protected) ____defineProperties(params, derivedopt, nullable)
Parameters:
Name |
Type |
Attributes |
Default |
Description |
params |
Object
|
|
|
|
derived |
Object
|
<optional>
<nullable>
|
null
|
Properties
Name |
Type |
Description |
GET |
Object
|
|
SET |
Object
|
|
|
- Overrides:
- Source:
(protected) ____defineProperty(args)
Parameters:
Name |
Type |
Description |
args |
Object
|
Properties
|
- Overrides:
- Source:
(protected) ____defineStaticProperties()
auto define all to be cleaned properties
- Overrides:
- Source:
Throws:
Error
(protected) ____extendParams(dest, src) → {Object}
Parameters:
Name |
Type |
Description |
dest |
Object
|
|
src |
Object
|
|
- Overrides:
- Source:
Returns:
-
Type
-
Object
- Overrides:
- Source:
Returns:
-
Type
-
Help4.jscore.Base.Params
(protected) ____getData() → {Object}
- Overrides:
- Source:
Returns:
-
Type
-
Object
(protected) ____mergeDerivedParams(level0, level1)
Parameters:
- Overrides:
- Source:
Throws:
Error
(protected) ____resolveDerivedParams(classConfig)
Parameters:
- Overrides:
- Source:
(protected) ____setInitValue(args)
Parameters:
Name |
Type |
Description |
args |
Object
|
Properties
|
- Overrides:
- Source:
(protected) _destroyControl(…keys)
destroys class properties
Parameters:
Name |
Type |
Attributes |
Description |
keys |
string
|
<repeatable>
|
|
- Overrides:
- Source:
fires an event that can be observed from outside
Parameters:
Name |
Type |
Description |
event |
Object
|
the event to be fired |
- Overrides:
- Source:
Returns:
-
Type
-
Help4.jscore.Base
fires an event that can be observed from outside
Parameters:
Name |
Type |
Description |
event |
Object
|
the event to be fired |
- Overrides:
- Source:
Returns:
-
Type
-
Promise.<Array.<Help4.EmbeddedEvent.EventResponse>>
fires an event that can be observed from outside
Parameters:
Name |
Type |
Description |
event |
Object
|
the event to be fired |
- Overrides:
- Source:
Returns:
-
Type
-
Array.<Help4.EmbeddedEvent.EventResponse>
addListenerSync(eventType, listener) → {Help4.jscore.Base}
add an event listener
Parameters:
Name |
Type |
Description |
eventType |
string
|
Array.<string>
|
event type to be observed |
listener |
Help4.EmbeddedEvent.Listener
|
the callback function |
- Overrides:
- Source:
Returns:
-
Type
-
Help4.jscore.Base
destroy()
destroys this instance
- Overrides:
- Source:
getPreferredLanguage() → {string}
- Source:
Returns:
-
Type
-
string
getTargetLanguage() → {string}
- Source:
Returns:
-
Type
-
string
isDestroyed() → {boolean}
whether instance is destroyed
- Overrides:
- Source:
Returns:
-
Type
-
boolean
isStarted() → {boolean}
- Source:
Returns:
-
Type
-
boolean
isTranslationActive() → {boolean}
- Source:
Returns:
-
Type
-
boolean
isTranslationAvailable() → {boolean}
- Source:
Returns:
-
Type
-
boolean
(async) onBubbleClick(params) → {Promise.<void>}
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
|
- Source:
Throws:
Error
Returns:
-
Type
-
Promise.<void>
(async) registerBubble(bubble)
Parameters:
- Source:
(async) start() → {Promise.<void>}
- Source:
Returns:
-
Type
-
Promise.<void>
(async) stop() → {Promise.<void>}
- Source:
Returns:
-
Type
-
Promise.<void>
unregisterBubble(bubble)
Parameters:
- Source:
Type Definitions
Bubbles
Type:
- Source:
ContentObject
Type:
Properties:
Name |
Type |
Description |
data |
string
|
|
contentType |
string
|
|
language |
string
|
|
- Source:
Params
Type:
Properties:
- Source:
PermissionsResponse
Type:
Properties:
Name |
Type |
Description |
response |
Object
|
Properties
Name |
Type |
Description |
permission |
Object
|
Properties
Name |
Type |
Description |
permissionNames |
Array.<string>
|
|
|
|
- Source:
ServerResponse
Type:
Properties:
- Source:
ServerResponseContent
Type:
Properties:
Name |
Type |
Description |
contentType |
string
|
content type of the text |
data |
string
|
translated text |
encoding |
string
|
|
status |
number
|
status code of the translation e.g. 200, 500 etc. |
- Source:
SupportedFeaturesResponse
Type:
Properties:
Name |
Type |
Description |
response |
Object
|
Properties
Name |
Type |
Description |
feature |
Object
|
Properties
Name |
Type |
Description |
featureNames |
Array.<string>
|
|
|
|
- Source:
TranslationData
Type:
Properties:
Name |
Type |
Description |
data |
Object
|
{en-US: Help4.engine.MLTEngine.ContentObject[], ...} |
meta |
Object
|
{en-US: [{original: , id: , widgetName: , subName?: }], de-DE: [{}]} |
cache |
Object
|
{en-US: [{translation: , original: , id: , widgetName: , subName?: }], de-DE: [{}]} |
- Source:
UrlConfig
Type:
Properties:
Name |
Type |
Description |
serverBaseUrl |
string
|
base URL of the content server |
translation |
string
|
URL extension for translation calls |
feature |
string
|
URL extension to check if feature is supported in SEN |
permission |
string
|
URL extension to check if user has permission in SEN |
supportedLanguages |
string
|
URL extension to get supported languages |
- Source: