public class Lang
extends java.lang.Object
Constructor and Description |
---|
Lang() |
Modifier and Type | Method and Description |
---|---|
static void |
change(java.lang.String locale)
Change language for next requests
|
static void |
clear()
Clears the current language - This wil trigger resolving language from request
if not manually set.
|
static java.lang.String |
get()
Retrieve the current language or null
|
static java.util.Locale |
getLocale() |
static java.util.Locale |
getLocale(java.lang.String localeStr) |
static java.util.Locale |
getLocaleOrDefault(java.lang.String localeStr) |
static boolean |
set(java.lang.String locale)
Force the current language
|
static void |
setDefaultLocale() |
public static java.lang.String get()
public static boolean set(java.lang.String locale)
locale
- (fr, ja, it ...)public static void clear()
public static void change(java.lang.String locale)
locale
- (e.g. "fr", "ja", "it", "en_ca", "fr_be", ...)public static void setDefaultLocale()
public static java.util.Locale getLocale()
public static java.util.Locale getLocaleOrDefault(java.lang.String localeStr)
public static java.util.Locale getLocale(java.lang.String localeStr)
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly