org.rapla.framework
Interface RaplaLocale


public interface RaplaLocale

This class contains all locale specific information for Rapla. Like

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.


Field Summary
static String LANGUAGE_ENTRY
           
static String ROLE
           
 
Method Summary
 Calendar createCalendar()
          creates a calendar initialized with the Rapla timezone ( that is always GMT+0 for Rapla ) and the selected locale
 String formatDate(Date date)
          format with locale DateFormat.SHORT
 String formatDateLong(Date date)
          format with locale DateFormat.MEDIUM
 String formatDateShort(Date date)
          format without year
 String formatNumber(long number)
          format long with the local NumberFormat
 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)
          sets time to 0:00:00 or 24:00:00
 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 toDate(int year, int month, int date)
          sets time to 0:00:00
 Date toTime(int hour, int minute, int second)
          sets date to 0:00:00
 

Field Detail

ROLE

static final String ROLE

LANGUAGE_ENTRY

static final String LANGUAGE_ENTRY
See Also:
Constant Field Values
Method Detail

getAvailableLanguages

String[] getAvailableLanguages()

createCalendar

Calendar createCalendar()
creates a calendar initialized with the Rapla timezone ( that is always GMT+0 for Rapla ) and the selected locale


formatTime

String formatTime(Date date)

toDate

Date toDate(Date date,
            boolean fillDate)
sets time to 0:00:00 or 24:00:00


toDate

Date toDate(int year,
            int month,
            int date)
sets time to 0:00:00


toTime

Date toTime(int hour,
            int minute,
            int second)
sets date to 0:00:00


toDate

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.


formatNumber

String formatNumber(long number)
format long with the local NumberFormat


formatDateShort

String formatDateShort(Date date)
format without year


formatDate

String formatDate(Date date)
format with locale DateFormat.SHORT


formatDateLong

String formatDateLong(Date date)
format with locale DateFormat.MEDIUM


getWeekday

String getWeekday(Date date)
Abbreviation of locale weekday name of date.


getMonth

String getMonth(Date date)
Monthname of date.


getCharsetNonUtf

String getCharsetNonUtf()

getTimeZone

TimeZone getTimeZone()

getLocale

Locale getLocale()


Copyright © 2000-2006 Rapla Team. All Rights Reseserved.