@Service public interface LocaleService
Modifier and Type | Method and Description |
---|---|
void |
addLocale(String locale)
Adds a new available locale.
|
void |
changeDefaultLocaleTo(String locale)
Changes the current default locale.
|
void |
deleteLocale(String locale)
Deletes an available locale.
|
Set<String> |
getAvailableLocales()
Returns all the available locales for the application.
|
String |
getClosestLocale(String locale)
Returns the closest locale from the given locale which is supported by the application.
|
String |
getDefaultLocale()
Returns the application's default locale.
|
Set<String> |
getSupportedLocales()
Returns all the locales supported by the platform.
|
boolean |
isAvailable(String localeCode)
Indicates whether the locale is available.
|
boolean isAvailable(String localeCode)
localeCode
- the locale code, e.g. "fr-BE"Set<String> getAvailableLocales()
Set<String> getSupportedLocales()
String getDefaultLocale()
String getClosestLocale(String locale)
locale
- The locale to match.void changeDefaultLocaleTo(String locale)
locale
- the locale to define as default.IllegalArgumentException
- if the locale is null.void addLocale(String locale)
Does nothing if locale already exists.
locale
- the locale to add.IllegalArgumentException
- if the locale argument is null.void deleteLocale(String locale)
Does nothing if the given locale does not exist.
locale
- the locale to delete.IllegalArgumentException
- if the locale argument is null.Copyright © 2013-2018–2019 SeedStack. All rights reserved.