Get Translation

Calling the function will return a promise that will be resolved with the translation of the given component name. For more information, please read the full documentation.

For new applications we prefer using TEW integration for translation. Please check our documentation documentation.

Usage

Name Description
window.e.utils.v2.translation.getTranslation(componentName) Returns promise that resolves with the translation object.

Parameters

Name Description Type Required Default value
componentName yes

Returns

Example

const componentName = 'event-content-decision';
const translations = await window.e.utils.getTranslation(componentName);
const translatedTitle = translations[componentName].title;