Difference between revisions of "Extensions.I18n.CompareUntranslatedString"
Jump to navigation
Jump to search
(Created page with "Category:i18n == Classification == {{ClassificationActivity | CompareUntranslatedString | Comparing an untranslated string with translations of the specified '''Translatio...") |
|||
Line 5: | Line 5: | ||
== Pseudo-Code Syntax == | == Pseudo-Code Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | BooleanTerm = I18n.CompareUntranslatedString(TrasnlationKey, StringTerm); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 20: | Line 20: | ||
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | Boolean result = CompareUntranslatedString( | + | Boolean result; |
+ | I18n.TranslationKey TranslationKey1; | ||
+ | |||
+ | TranslationKey1 = I18n.CreateTranslationKey("TEXT_1"); | ||
+ | result = I18n.CompareUntranslatedString(TranslationKey1, "vehicles", null); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 08:08, 10 February 2015
Contents
Classification
Name | CompareUntranslatedString |
Short Description | Comparing an untranslated string with translations of the specified TranslationKey |
Class | Term |
Extension | OTX i18n extension |
Group | Translation related terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
Pseudo-Code Syntax
BooleanTerm = I18n.CompareUntranslatedString(TrasnlationKey, StringTerm);
Description
The CompareUntranslatedString term compares whether an untranslated string matches at least one of the translations of the specified TranslationKey.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Boolean | The term will return TRUE if and only if a suitable translation can be found. |
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. |
UntranslatedString | String | Term | - | [1] | The string to be tested for a match. |
OTL Examples
Boolean result;
I18n.TranslationKey TranslationKey1;
TranslationKey1 = I18n.CreateTranslationKey("TEXT_1");
result = I18n.CompareUntranslatedString(TranslationKey1, "vehicles", null);