Allows users to implement their own I18n extension.
More...
|
bool | CompareUntranslatedString (IRuntimeContext runtimeContext, TranslationKey translationKey, List< string > arguments, string untranslatedString) |
| Compares whether an untranslated string equals at least one of the translations of a given translation key.While searching for a match, each available locale shall be considered by the runtime. More...
|
|
List< string > | GetAllLocales (IRuntimeContext runtimeContext) |
| Gets all available locales from the runtime system that are supported and for which translations are available. More...
|
|
string | GetCurrentLocale (IRuntimeContext runtimeContext) |
| Gets the current locale code in use by the runtime system. More...
|
|
string | Translate (IRuntimeContext runtimeContext, TranslationKey translationKey, List< string > arguments) |
| The Translate accepts a TranslationKey which may be supplemented by additional translation arguments for message parameter substitution More...
|
|
string | TranslateToLocale (IRuntimeContext runtimeContext, string locale, TranslationKey translationKey, List< string > arguments) |
| The TranslateToLocale shall perform a similar function to the Translate, but instead of using the current locale it shall use a target locale that is given as an argument to the call. More...
|
|
Allows users to implement their own I18n extension.
◆ CompareUntranslatedString()
bool OpenTestSystem.Otx.Runtime.Api.Custom.Ii18nImplementation.CompareUntranslatedString |
( |
IRuntimeContext |
runtimeContext, |
|
|
TranslationKey |
translationKey, |
|
|
List< string > |
arguments, |
|
|
string |
untranslatedString |
|
) |
| |
Compares whether an untranslated string equals at least one of the translations of a given translation key.While searching for a match, each available locale shall be considered by the runtime.
- Parameters
-
runtimeContext | The related runtime context. |
translationKey | This element represents a unique key that the system shall use to search its internal database for a matching translation which matches the untranslated string |
arguments | This optional element represents a list of arguments for the translation. |
untranslatedString | Represents the string which shall be tested for a match. |
- Returns
- Return true if and only if a matching translation can be found.
◆ GetAllLocales()
List<string> OpenTestSystem.Otx.Runtime.Api.Custom.Ii18nImplementation.GetAllLocales |
( |
IRuntimeContext |
runtimeContext | ) |
|
Gets all available locales from the runtime system that are supported and for which translations are available.
- Parameters
-
runtimeContext | The related runtime context. |
- Returns
- A list of strings of all locals
◆ GetCurrentLocale()
string OpenTestSystem.Otx.Runtime.Api.Custom.Ii18nImplementation.GetCurrentLocale |
( |
IRuntimeContext |
runtimeContext | ) |
|
Gets the current locale code in use by the runtime system.
- Parameters
-
runtimeContext | The related runtime context. |
- Returns
- The current locale code. If no current locale is selected, the system shall return the default locale.
◆ Translate()
string OpenTestSystem.Otx.Runtime.Api.Custom.Ii18nImplementation.Translate |
( |
IRuntimeContext |
runtimeContext, |
|
|
TranslationKey |
translationKey, |
|
|
List< string > |
arguments |
|
) |
| |
The Translate accepts a TranslationKey which may be supplemented by additional translation arguments for message parameter substitution
- Parameters
-
runtimeContext | The related runtime context. |
translationKey | This element represents a unique key that the system shall use to search its internal database for a translation. |
arguments | This optional element represents a list of arguments for the translation. The arguments shall be evaluated first before being inserted into the translated message.The order of arguments is important; the first argument shall substitute message parameter {0}, the second parameter {1}, and so on. |
- Returns
- A localized string in the current user language.
◆ TranslateToLocale()
string OpenTestSystem.Otx.Runtime.Api.Custom.Ii18nImplementation.TranslateToLocale |
( |
IRuntimeContext |
runtimeContext, |
|
|
string |
locale, |
|
|
TranslationKey |
translationKey, |
|
|
List< string > |
arguments |
|
) |
| |
The TranslateToLocale shall perform a similar function to the Translate, but instead of using the current locale it shall use a target locale that is given as an argument to the call.
- Parameters
-
runtimeContext | The related runtime context. |
locale | The translation process shall use this string as the target locale for the translation. |
translationKey | This element represents a unique key that the system shall use to search its internal database for a translation. |
arguments | This optional element represents a list of arguments for the translation. The arguments shall be evaluated first before being inserted into the translated message.The order of arguments is important; the first argument shall substitute message parameter {0}, the second parameter {1}, and so on. |
- Returns
- A localized string in the target locale.
The documentation for this interface was generated from the following file: