| org.rapla.framework.RaplaLocale
All known Subclasses: org.rapla.RaplaLocaleImpl,
RaplaLocale | public interface RaplaLocale (Code) | | This class contains all locale specific information for Rapla. Like
- Selected language.
- Selected country.
- Available languages (if the user has the possibility to choose a language)
- TimeZone for appointments (This is always GMT+0)
Also it provides basic formating information for the dates.
Configuration is done in the rapla.xconf:
<locale>
<languages default="de">
<language>de</language>
<language>en</language>
</languages>
<country>US</country>
</locale>
If languages default is not set, the system default wil be used.
If country code is not set, the system default will be used.
|
Method Summary | |
Calendar | createCalendar() | String | formatDate(Date date) | String | formatDateLong(Date date) | String | formatDateShort(Date date) | String | formatNumber(long number) | String | formatTime(Date date) | String[] | getAvailableLanguages() | String | getCharsetNonUtf() | Locale | getLocale() | String | getMonth(Date date) Monthname of date. | TimeZone | getTimeZone() | String | getWeekday(Date date) Abbreviation of locale weekday name of date. | Date | toDate(Date date, boolean fillDate) | Date | toDate(int year, int month, int date) | Date | toDate(Date date, Date time) Uses the first date parameter for year, month, date information and
the second for hour, minutes, second, millisecond information. | Date | toTime(int hour, int minute, int second) |
createCalendar | Calendar createCalendar()(Code) | | creates a calendar initialized with the Rapla timezone ( that is always GMT+0 for Rapla ) and the selected locale
|
formatDate | String formatDate(Date date)(Code) | | format with locale DateFormat.SHORT
|
formatDateLong | String formatDateLong(Date date)(Code) | | format with locale DateFormat.MEDIUM
|
formatNumber | String formatNumber(long number)(Code) | | format long with the local NumberFormat
|
getAvailableLanguages | String[] getAvailableLanguages()(Code) | | |
getWeekday | String getWeekday(Date date)(Code) | | Abbreviation of locale weekday name of date.
|
toDate | Date toDate(Date date, boolean fillDate)(Code) | | sets time to 0:00:00 or 24:00:00
|
toDate | Date toDate(int year, int month, int date)(Code) | | sets time to 0:00:00
|
toDate | Date toDate(Date date, Date time)(Code) | | Uses the first date parameter for year, month, date information and
the second for hour, minutes, second, millisecond information.
|
toTime | Date toTime(int hour, int minute, int second)(Code) | | sets date to 0:00:00
|
|
|