Locale represents a locale setting, consisting of a language, script, region, variants, extensions and private use section.
Method | Description |
---|---|
sap.ui.core.Locale.extend |
Creates a new subclass of class sap.ui.core.Locale with name
|
sap.ui.core.Locale.fromSAPLogonLanguage |
Retrieves a Locale for the given SAP logon language or BCP47 tag. |
getExtension |
Get the locale extension as a single string or The extension always consists of a singleton character (not 'x'), a dash '-' and one or more extension token, each separated again with a dash. Use #getExtensions to get the individual extension tokens as an array. |
getExtensionSubtags |
Get the locale extensions as an array of tokens. The leading singleton and the separating dashes are not part of the result. If there is no extensions section in the locale tag, an empty array is returned. |
getLanguage |
Get the locale language. Note that the case might differ from the original script tag (Lower case is enforced as recommended by BCP47/ISO639). |
sap.ui.core.Locale.getMetadata |
Returns a metadata object for class sap.ui.core.Locale. |
getModernLanguage | |
getPreferredCalendarType | |
getPrivateUse |
Get the locale private use section or |
getPrivateUseSubtags |
Get the locale private use section as an array of tokens. The leading singleton and the separating dashes are not part of the result. If there is no private use section in the locale tag, an empty array is returned. |
getRegion |
Get the locale region or Note that the case might differ from the original script tag (Upper case is enforced as recommended by BCP47/ISO3166-1). |
getSAPLogonLanguage |
Best guess to get a proper SAP Logon Language for this locale. Conversions taken into account:
Note that the conversion also returns a result for languages that are not supported by the default set of SAP languages. This method has no knowledge about the concrete languages of any given backend system.
Since 1.44 use {@link sap.ui.core.Configuration#getSAPLogonLanguage} instead as that class allows to configure an SAP Logon language.
|
getScript |
Get the locale script or Note that the case might differ from the original language tag (Upper case first letter and lower case reminder enforced as recommended by BCP47/ISO15924) |
getVariant |
Get the locale variants as a single string or Multiple variants are separated by a dash '-'. |
getVariantSubtags |
Get the locale variants as an array of individual variants. The separating dashes are not part of the result. If there is no variant section in the locale tag, an empty array is returned. |
toLanguageTag |
Creates a new subclass of class sap.ui.core.Locale with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.base.Object.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Retrieves a Locale for the given SAP logon language or BCP47 tag.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSAPLogonLanguage | string |
A SAP logon language, e.g. "ZF" or a BCP47 language tag |
Get the locale extension as a single string or null
.
The extension always consists of a singleton character (not 'x'), a dash '-' and one or more extension token, each separated again with a dash.
Use #getExtensions to get the individual extension tokens as an array.
Get the locale extensions as an array of tokens.
The leading singleton and the separating dashes are not part of the result. If there is no extensions section in the locale tag, an empty array is returned.
Get the locale language.
Note that the case might differ from the original script tag (Lower case is enforced as recommended by BCP47/ISO639).
Get the locale private use section as an array of tokens.
The leading singleton and the separating dashes are not part of the result. If there is no private use section in the locale tag, an empty array is returned.
Get the locale region or null
if none was specified.
Note that the case might differ from the original script tag (Upper case is enforced as recommended by BCP47/ISO3166-1).
Best guess to get a proper SAP Logon Language for this locale.
Conversions taken into account:
Note that the conversion also returns a result for languages that are not supported by the default set of SAP languages. This method has no knowledge about the concrete languages of any given backend system.
Get the locale script or null
if none was specified.
Note that the case might differ from the original language tag (Upper case first letter and lower case reminder enforced as recommended by BCP47/ISO15924)
Get the locale variants as a single string or null
.
Multiple variants are separated by a dash '-'.