Package org.craftercms.engine.util
Class LocaleUtils
java.lang.Object
org.craftercms.commons.locale.LocaleUtils
org.craftercms.engine.util.LocaleUtils
public abstract class LocaleUtils
extends org.craftercms.commons.locale.LocaleUtils
Extension of
LocaleUtils
that automatically uses the current locale & fallback
according to the site configuration- Since:
- 4.0.0
- Author:
- joseross
-
Field Summary
Fields inherited from class org.craftercms.commons.locale.LocaleUtils
CONFIG_KEY_DEFAULT_LOCALE, CONFIG_KEY_FALLBACK, CONFIG_KEY_SUPPORTED_LOCALES, LOCALE_PATTERN, LOCALE_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Locale
static Locale
static Locale
getDefaultLocale
(org.apache.commons.configuration2.Configuration config) getSupportedLocales
(org.apache.commons.configuration2.Configuration config) static boolean
static boolean
static String
resolveLocalePath
(String path, Predicate<String> exists) Methods inherited from class org.craftercms.commons.locale.LocaleUtils
appendLocale, appendLocales, delocalizePath, findPath, getCompatibleLocales, getCompatibleLocales, localizePath, parseLocale, parseLocales, toString
-
Constructor Details
-
LocaleUtils
public LocaleUtils()
-
-
Method Details
-
getCurrentLocale
-
isTranslationEnabled
public static boolean isTranslationEnabled() -
getDefaultLocale
-
getDefaultLocale
-
isLocaleFallbackEnabled
public static boolean isLocaleFallbackEnabled() -
getCompatibleLocales
-
resolveLocalePath
-
getSupportedLocales
-
getSupportedLocales
-