LanguageProvider

Provides the preferred language Locale of the current user.

One of a number of services that work together to provide support for i18n.

API

LanguageProvider.java
interface LanguageProvider {
  Optional<Locale> getPreferredLanguage()     (1)
}
1 getPreferredLanguage()

Optionally returns the preferred language Locale of the current user, based on whether there is a context with a current user object.

Members

getPreferredLanguage()

Optionally returns the preferred language Locale of the current user, based on whether there is a context with a current user object.

Implementation

The Core Runtime Services module provides an implementation of this service, LanguageProviderDefault.

Usage Notes

For the "big picture" and further details on the framework’s i18n support, can be found in a chapter in the user guide.

See also

Other i18n services include: