Difference between revisions of "Extensions.I18n.GetAllLocales"
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | /// Local Declarations | |
+ | List<String> ListVariable; | ||
+ | /// Flow | ||
+ | ListVariable = I18n.GetAllLocales(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 24: | Line 27: | ||
== OTL Examples == | == OTL Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | /// Local Declarations | ||
+ | |||
List<String> List1; | List<String> List1; | ||
Revision as of 06:49, 25 October 2018
Contents
Classification
Name | GetAllLocales |
Short Description | Retrieve all available locales |
Class | Term |
Extension | OTX i18n extension |
Group | Locale settings related terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
/// Local Declarations
List<String> ListVariable;
/// Flow
ListVariable = I18n.GetAllLocales();
Description
The term GetAllLocales should retrieve all available locales from the runtime system that are supported and for which translations are available.
The fact that a runtime system returns a locale does not guarantee that all translations and units are available. Rather, this method returns the locales that can be used, regardless of data availability. It is however recommended that runtime systems consult their translation data store before returning the list of locales, so the results should be close to the actual available data.
The returned value shall be a list of strings using the same locale format as specified for the GetCurrentLocale term.
This term allows querying some of the capabilities of the underlying runtime system. It is useful information e.g. for the TranslateToLocale term, as it is known before hand what can be used as valid locale input.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
List | All available locales. |
Properties
- NONE
OTL Examples
/// Local Declarations
List<String> List1;
/// Flow
List1 = I18n.GetAllLocales();