Class FlowableExpressionLocaleUtils
java.lang.Object
com.flowable.platform.expressions.FlowableExpressionLocaleUtils
Expression Bean Name: flw.locale
Provides utilities to work with locales, countries and languages.
All methods which accept a language tag must be supplied with a string consisting of the language code and the country,
e.g. "ch-DE", "en-US" etc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a list of all 2-letter ISO country codes.getAllCountryDisplayNames
(String displayLanguageTag) Returns a list of all country names in a certain language Example: #{flwLocaleUtils.getAllCountryDisplayNames('de-CH')}Returns a list of all ISO language codes, e.g.getAllLanguageDisplayNames
(String displayLanguageTag) Returns a list of all language names in a certain language.Gets a list of all availableLocale
s.getCountryDisplayName
(String languageTag, String displayLanguageTag) Returns a single country name in a certain language, e.g.Returns the defaultLocale
of the system.getLanguageDisplayName
(String languageIsoCode, String displayLanguageTag) Returns a single language name in a certain language, e.g.getLocaleForLanguageTag
(String languageTag) Gets the Locale with the given language tag, e.g.
-
Constructor Details
-
FlowableExpressionLocaleUtils
public FlowableExpressionLocaleUtils()
-
-
Method Details
-
getLocaleForLanguageTag
Gets the Locale with the given language tag, e.g. "ch-DE". Please be aware that Example: #{flwLocaleUtils.getLocaleForLanguageTag('ch-DE')}- Parameters:
languageTag
- An existing language tag.- Returns:
- The locale corresponding to the language tag.
-
getAvailableLocales
Gets a list of all availableLocale
s. Example:{flwLocaleUtils.getAvailableLocales()}- Returns:
- List of all available Locales.
-
getDefaultLocale
Returns the defaultLocale
of the system. Can be used to gain default currency etc. Example: {flwLocaleUtils.getDefaultLocale()}- Returns:
- The default
Locale
of the system.
-
getAllCountryCodes
Returns a list of all 2-letter ISO country codes. Example: #{flwLocaleUtils.getAllCountryCodes()}- Returns:
- List of all country codes
-
getAllLanguageCodes
Returns a list of all ISO language codes, e.g. "de", NOT "de-CH". Example: #{flwLocaleUtils.getAllLanguageCodes()}- Returns:
- List of all language codes
-
getLanguageDisplayName
Returns a single language name in a certain language, e.g. "German" or "Spanish". Example: #{flwLocaleUtils.getLanguageDisplayName('de-CH', 'en-US')}- Parameters:
languageIsoCode
- 2-letter ISO code of the languagedisplayLanguageTag
- The target language to display the language in- Returns:
- The display name corresponding to the language tag
-
getCountryDisplayName
Returns a single country name in a certain language, e.g. "Switzerland" or "Germany". Example: #{flwLocaleUtils.getCountryDisplayName('de-CH', 'en-US')}- Parameters:
languageTag
- Language tag of the countrydisplayLanguageTag
- The target language to display the country in- Returns:
- The display name corresponding to the language tag
-
getAllLanguageDisplayNames
Returns a list of all language names in a certain language. Example: #{flwLocaleUtils.getAllLanguageDisplayNames('de-CH')}- Parameters:
displayLanguageTag
- The language to display the language names in.- Returns:
- List of all language names.
-
getAllCountryDisplayNames
Returns a list of all country names in a certain language Example: #{flwLocaleUtils.getAllCountryDisplayNames('de-CH')}- Parameters:
displayLanguageTag
- The language to display the language names in.- Returns:
- List of all country names.
-