Methods
# translate(_translationBundle, _translationKey, _translationParameters) → {string}
Translates a key into the target locale using the translation functionality provided by the plugin client. The returned string is based on the language selected in the client. Falls back to the key itself if no translation is found.
Parameters:
Name | Type | Description |
---|---|---|
_translationBundle |
Object.<string, Object.<string, string>>
|
A translation bundle organized by locale. Each locale maps to an object of translation keys and their localized strings. Example:
|
_translationKey |
string
|
The translation key to look up. |
_translationParameters |
Object.<string, string>
|
Optional parameters to interpolate into the translation string
(e.g., |
The translated string, or the key if no translation is available.
string