Translatable text
Parse static translatable text from HTML and JavaScript view files, storing entries as triDictionaryEntry business object records, generating translated versions based on profile language settings for non-English browsers.
As part of the UX framework, the Maximo® Real Estate and Facilities platform can parse static translatable text from the UX view. Each view is made up of one or more HTML or JavaScript (JS) files. In turn, each HTML or JS file can be made up of the following components: Maximo Real Estate and Facilities components, custom components, Polymer-based or React-based elements, and traditional HTML elements, as discussed in earlier articles.
The translatable text is stored as records of the triDictionaryEntry business object in the System module. When you open the UX view, the platform checks the language setting in your profile. If the language is not US English, the platform generates a translated version of the HTML or JS files and components, and pushes the translated UX view to your web browser.
Conditions for translatable text
- The HTML or JS element does not have
the
translateattribute <paper-tab>Space Details</paper-tab>Translatable text:
Space Details- The HTML or JS element has the
translateattribute with the value ofyes <paper-tab translate="yes">Audited Actions</paper-tab>Translatable text:
Audited Actions- The text is not blank and has at least one alphabetic character
Space DetailsAudited Actions123 A- The text contains data binding and has at least one alphabetic character
<span class="city">City: <span class="value">{{item.city}}</span></span>Translatable text:
City: <span class="value">{{item.city}}</span>
Sources of translatable text
| HTML or JS element | Translatable text | Examples |
|---|---|---|
| Any element |
The alt attribute
The The The The The The Any custom |
<paper-input label="Area" error-message="Invalid input value." value=
"{{data.triAreaNU}}"> </paper-input>
|
| Any element Except for inner tags |
The text nodes
Parse the text nodes as individual translatable text and not concatenated text |
<div>IBM TRIRIGA : <b>Move Planner</b>
Application</div>
(2 separate texts)
|
| See the following List of inner tags | The inner HTML |
<b>Move Planner</b>
|
<p>, <span> |
The inner HTML
Grab the full inner HTML which can contain concatenated text with inner tags
like |
<p>You <b>don't</b> have any requests</p>
|
<script> |
Any custom JavaScript __dictionary__* variable
(double underscore before, double underscore after) |
__dictionary__1 = "Space Details.";
|
| List of inner tags |
|---|
<a>, <abbr>, <acronym>, <b>, <bdi>, <bdo>,
<cite>, <code>, <del>, <dfn>, <em>, <h*> (h1, h2, etc.), <i>, <ins>,
<kbd>, <label>, <mark>, <meter>, <output>, <progress>, <q>, <rp>, <rt>,
<ruby>, <s>, <samp>, <small>, <strong>, <sub>, <sup>, <time>, <u>,
<var>, <wbr> |