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 ofLocaleUtils
that automatically uses the current locale & fallback according to the site configuration- Since:
- 4.0.0
- Author:
- joseross
-
-
Constructor Summary
Constructors Constructor Description LocaleUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Locale>
getCompatibleLocales()
static Locale
getCurrentLocale()
static Locale
getDefaultLocale()
static Locale
getDefaultLocale(org.apache.commons.configuration2.Configuration config)
static List<Locale>
getSupportedLocales()
static List<Locale>
getSupportedLocales(org.apache.commons.configuration2.Configuration config)
static boolean
isLocaleFallbackEnabled()
static boolean
isTranslationEnabled()
static String
resolveLocalePath(String path, Predicate<String> exists)
-
-
-
Method Detail
-
getCurrentLocale
public static Locale getCurrentLocale()
-
isTranslationEnabled
public static boolean isTranslationEnabled()
-
getDefaultLocale
public static Locale getDefaultLocale()
-
getDefaultLocale
public static Locale getDefaultLocale(org.apache.commons.configuration2.Configuration config)
-
isLocaleFallbackEnabled
public static boolean isLocaleFallbackEnabled()
-
-