The
The
| Property | Description |
| locale | An identifier for the selected language. May be a broad categorisation such as "en", or a sub-specification such as "zh-CN" or "zh-HK". |
| isRTL | True/false depending on whether the language is usually written right-to-left instead of left-to-right. Note: MyTrader automatically sets a CSS class on a widget's |
The functions in
| Function | Description |
| Translates language variables in HTML | |
| Translates a single language variable | |
| Short-hand version of | |
| Translates an error result into the equivalent text | |
| Translates a chart timeframe, such as 3600, into corresponding text | |
| Translates a market category ID into corresponding text |
For example, translating an individual text item:
var freeMarginText = Framework.TranslateItem("FreeMargin"); // = "Free margin"
Translating items in a block of HTML:
<table id="MetricsTable">
<tr>
<th title="{Balance}">{Balance}</th>
<th title="{Equity}">{Equity}</th>
<th title="{FloatingPL}">{FloatingPL}</th>
</tr>
</table>
…
// Translate all {variables} inside the MetricsTable element.
// Calling TranslateDOM() without a parameter scans the entire document body.
Framework.TranslateDOM(document.getElementById("MetricsTable"));