public class Lang extends Object
| Constructor and Description |
|---|
Lang() |
| Modifier and Type | Method and Description |
|---|---|
static void |
change(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 String |
get()
Retrieve the current language or null
|
static Locale |
getLocale() |
static Locale |
getLocale(String localeStr) |
static Locale |
getLocaleOrDefault(String localeStr) |
static boolean |
set(String locale)
Force the current language
|
static void |
setDefaultLocale() |
public static String get()
public static boolean set(String locale)
locale - (fr, ja, it ...)public static void clear()
public static void change(String locale)
locale - (e.g. "fr", "ja", "it", "en_ca", "fr_be", ...)public static void setDefaultLocale()
public static Locale getLocale()
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly