Difference between revisions of "Extensions.I18n.Translate"
Jump to navigation
Jump to search
(Created page with "Category:i18n == Classification == {{ClassificationActivity | Translate | Returns a localized string from a '''TranslationKey''' | Term | OTX i18n extension |...") |
|||
Line 3: | Line 3: | ||
{{ClassificationActivity | Translate | Returns a localized string from a '''TranslationKey''' | [[Term]] | [[i18n|OTX i18n extension]] | [[Translation related terms]] | - | - }} | {{ClassificationActivity | Translate | Returns a localized string from a '''TranslationKey''' | [[Term]] | [[i18n|OTX i18n extension]] | [[Translation related terms]] | - | - }} | ||
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | StringTerm = I18n.Translate(TrasnlationKey); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 21: | Line 21: | ||
== Examples == | == Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | String result = Translate(TranslationKey); | + | I18n.TranslationKey TranslationKey1; |
+ | String result; | ||
+ | |||
+ | TranslationKey1 = I18n.CreateTranslationKey("TEXT_1"); | ||
+ | result = Translate(TranslationKey); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 08:04, 10 February 2015
Contents
Classification
Name | Translate |
Short Description | Returns a localized string from a TranslationKey |
Class | Term |
Extension | OTX i18n extension |
Group | Translation related terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
StringTerm = I18n.Translate(TrasnlationKey);
Description
The Translate term accepts a TranslationKey argument and returns a localized string in the current user language.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
String | Localized string in the current user language. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
TrasnlationKey | TrasnlationKey | Term | - | [1] | A unique key that the system uses to locate a translation into internal database. |
Examples
I18n.TranslationKey TranslationKey1;
String result;
TranslationKey1 = I18n.CreateTranslationKey("TEXT_1");
result = Translate(TranslationKey);
See also
CreateTranslationKey
TranslateToLocale
CompareUntranslatedString