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(TranslationKeyTerm translationKey, {Term[ ] arguments}, StringTerm untranslatedString);
Description
The CompareUntranslatedString term compares whether an untranslated string matches at least one of the translations of the specified TranslationKey. While searching for a match, each available locale shall be considered by the runtime. The term shall return TRUE if and only if a matching translation can be found.
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 matching translation can be found.
|
Properties
| Name |
Data Type |
Class |
Default |
Cardinality |
Description
|
| TranslationKey |
TranslationKey |
Term |
- |
[1] |
This element represents an unique key that the system shall use to search its internal database for a matching translation which matches the untranslated string.
|
| Arguments |
TranslationArguments |
Term |
- |
[0..1] |
This optional element represents a list of arguments for the translation.
|
| UntranslatedString |
String |
Term |
- |
[1] |
Represents the string which shall be tested for a match.
|
OTL Examples
/// Local Declarations
I18n.TranslationKey TranslationKey1;
Boolean Boolean1 = false;
/// Flow
TranslationKey1 = I18n.CreateTranslationKey("TEXT_1");
Boolean1 = I18n.CompareUntranslatedString(TranslationKey1, NULL, "UntranslatedString");
See also
CreateTranslationKey
Translate
TranslateToLocale