Package com.vaadin.client
Class LocaleService
- java.lang.Object
-
- com.vaadin.client.LocaleService
-
public class LocaleService extends Object
Date / time etc. localization service for all widgets. Caches all loaded locales as JSONObjects.- Author:
- Vaadin Ltd.
-
-
Constructor Summary
Constructors Constructor Description LocaleService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddLocale(UIState.LocaleData localeData)static voidaddLocales(List<UIState.LocaleData> localeDatas)static String[]getAmPmStrings(String locale)static Set<String>getAvailableLocales()static StringgetClockDelimiter(String locale)static StringgetDateFormat(String locale)static String[]getDayNames(String locale)static StringgetDefaultLocale()static intgetFirstDayOfWeek(String locale)static String[]getMonthNames(String locale)static String[]getShortDayNames(String locale)static String[]getShortMonthNames(String locale)static booleanisTwelveHourClock(String locale)static voidsetDefaultLocale(String locale)
-
-
-
Method Detail
-
addLocale
public static void addLocale(UIState.LocaleData localeData)
-
setDefaultLocale
public static void setDefaultLocale(String locale)
-
getDefaultLocale
public static String getDefaultLocale()
-
getMonthNames
public static String[] getMonthNames(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
getShortMonthNames
public static String[] getShortMonthNames(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
getDayNames
public static String[] getDayNames(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
getShortDayNames
public static String[] getShortDayNames(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
getFirstDayOfWeek
public static int getFirstDayOfWeek(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
getDateFormat
public static String getDateFormat(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
isTwelveHourClock
public static boolean isTwelveHourClock(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
getClockDelimiter
public static String getClockDelimiter(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
getAmPmStrings
public static String[] getAmPmStrings(String locale) throws LocaleNotLoadedException
- Throws:
LocaleNotLoadedException
-
addLocales
public static void addLocales(List<UIState.LocaleData> localeDatas)
-
-