40 |
|
|
41 |
package gnu.java.locale; |
package gnu.java.locale; |
42 |
|
|
43 |
|
import java.util.Enumeration; |
44 |
|
import java.util.Hashtable; |
45 |
|
import java.util.StringTokenizer; |
46 |
import java.util.ListResourceBundle; |
import java.util.ListResourceBundle; |
47 |
|
|
48 |
public class LocaleInformation extends ListResourceBundle |
public class LocaleInformation extends ListResourceBundle |
49 |
{ |
{ |
50 |
private static final String[] ampms = { "AM", "PM" }; |
private static final String currenciesDisplayNameKeys = "INR\u00A6JPY\u00A6ITL\u00A6EUR\u00A6GBP\u00A6USD"; |
51 |
|
|
52 |
private static final String[][] zoneStrings = |
private static final String currenciesDisplayNameValues = "INR\u00A6JPY\u00A6ITL\u00A6EUR\u00A6GBP\u00A6USD"; |
|
{ |
|
|
{ "GMT", "Greenwich Mean Time", "GMT", |
|
|
/**/ "Greenwich Mean Time", "GMT", "GMT" }, |
|
|
{ "PST", "Pacific Standard Time", "PST", |
|
|
/**/ "Pacific Daylight Time", "PDT", "San Francisco" }, |
|
|
{ "MST", "Mountain Standard Time", "MST", |
|
|
/**/ "Mountain Daylight Time", "MDT", "Denver" }, |
|
|
{ "PNT", "Mountain Standard Time", "MST", |
|
|
/**/ "Mountain Standard Time", "MST", "Phoenix" }, |
|
|
{ "CST", "Central Standard Time", "CST", |
|
|
/**/ "Central Daylight Time", "CDT", "Chicago" }, |
|
|
{ "EST", "Eastern Standard Time", "EST", |
|
|
/**/ "Eastern Daylight Time", "EDT", "Boston" }, |
|
|
{ "IET", "Eastern Standard Time", "EST", |
|
|
/**/ "Eastern Standard Time", "EST", "Indianapolis" }, |
|
|
{ "PRT", "Atlantic Standard Time", "AST", |
|
|
/**/ "Atlantic Daylight Time", "ADT", "Halifax" }, |
|
|
{ "CNT", "Newfoundland Standard Time", "NST", |
|
|
/**/ "Newfoundland Daylight Time", "NDT", "St. Johns" }, |
|
|
{ "ECT", "Central European Standard Time", "CET", |
|
|
/**/ "Central European Daylight Time", "CEST", "Paris" }, |
|
|
{ "CTT", "China Standard Time", "CST", |
|
|
/**/ "China Standard Time", "CST", "Shanghai" }, |
|
|
{ "JST", "Japan Standard Time", "JST", |
|
|
/**/ "Japan Standard Time", "JST", "Tokyo" }, |
|
|
{ "HST", "Hawaii Standard Time", "HST", |
|
|
/**/ "Hawaii Standard Time", "HST", "Honolulu" }, |
|
|
{ "AST", "Alaska Standard Time", "AKST", |
|
|
/**/ "Alaska Daylight Time", "AKDT", "Anchorage" } |
|
|
}; |
|
53 |
|
|
54 |
private static final class HashtableCurrencySymbols extends java.util.Hashtable |
private static final Hashtable currenciesDisplayName; |
55 |
|
static |
56 |
{ |
{ |
57 |
public HashtableCurrencySymbols() |
currenciesDisplayName = new Hashtable(); |
58 |
{ |
Enumeration keys = new StringTokenizer(currenciesDisplayNameKeys, "\u00A6"); |
59 |
super(); |
Enumeration values = new StringTokenizer(currenciesDisplayNameValues, "\u00A6"); |
60 |
put("GBP", "\u00a3"); |
while (keys.hasMoreElements()) |
61 |
put("JPY", "\u00A5"); |
{ |
62 |
put("ITL", "\u20A4"); |
String key = (String) keys.nextElement(); |
63 |
put("NGN", "\u20A6"); |
String value = (String) values.nextElement(); |
64 |
put("ESP", "\u20A7"); |
currenciesDisplayName.put(key, value); |
65 |
put("INR", "=0#\u20A8.|1#Re.|1<\u20A8."); /* Complex format -- see DecimalFormat */ |
} |
|
put("KRW", "\u20A9"); |
|
|
put("ILS", "\u20AA"); |
|
|
put("VND", "\u20AB"); |
|
|
put("EUR", "\u20ac"); |
|
|
put("TWD", "NT$"); |
|
|
put("USD", "US$"); |
|
|
put("CAD", "CAN$"); |
|
|
put("AUD", "A$"); |
|
|
put("JMD", "J$"); |
|
|
put("ZWD", "Z$"); |
|
|
put("IQD", "ID"); |
|
|
put("EEK", "kr"); |
|
|
} |
|
66 |
} |
} |
67 |
|
|
68 |
private static final java.util.Hashtable currencySymbols = new HashtableCurrencySymbols(); |
private static final String currenciesSymbolKeys = "INR\u00A6JPY\u00A6ITL\u00A6EUR\u00A6GBP\u00A6USD"; |
69 |
|
|
70 |
public static java.util.Hashtable getCurrencySymbols() |
private static final String currenciesSymbolValues = "=0#Rs.|1#Re.|1<Rs.\u00A6\u00a5\u00A6\u20a4\u00A6\u20ac\u00A6\u00a3\u00A6$"; |
71 |
|
|
72 |
|
private static final Hashtable currenciesSymbol; |
73 |
|
static |
74 |
{ |
{ |
75 |
return currencySymbols; |
currenciesSymbol = new Hashtable(); |
76 |
|
Enumeration keys = new StringTokenizer(currenciesSymbolKeys, "\u00A6"); |
77 |
|
Enumeration values = new StringTokenizer(currenciesSymbolValues, "\u00A6"); |
78 |
|
while (keys.hasMoreElements()) |
79 |
|
{ |
80 |
|
String key = (String) keys.nextElement(); |
81 |
|
String value = (String) values.nextElement(); |
82 |
|
currenciesSymbol.put(key, value); |
83 |
|
} |
84 |
} |
} |
85 |
|
|
86 |
|
private static final String[] shortMonths = { |
87 |
|
"1", |
88 |
|
"2", |
89 |
|
"3", |
90 |
|
"4", |
91 |
|
"5", |
92 |
|
"6", |
93 |
|
"7", |
94 |
|
"8", |
95 |
|
"9", |
96 |
|
"10", |
97 |
|
"11", |
98 |
|
"12", |
99 |
|
null, |
100 |
|
}; |
101 |
|
|
102 |
|
private static final String[] months = { |
103 |
|
"1", |
104 |
|
"2", |
105 |
|
"3", |
106 |
|
"4", |
107 |
|
"5", |
108 |
|
"6", |
109 |
|
"7", |
110 |
|
"8", |
111 |
|
"9", |
112 |
|
"10", |
113 |
|
"11", |
114 |
|
"12", |
115 |
|
null, |
116 |
|
}; |
117 |
|
|
118 |
|
private static final String[] shortWeekdays = { |
119 |
|
null, |
120 |
|
"1", |
121 |
|
"2", |
122 |
|
"3", |
123 |
|
"4", |
124 |
|
"5", |
125 |
|
"6", |
126 |
|
"7", |
127 |
|
}; |
128 |
|
|
129 |
|
private static final String[] weekdays = { |
130 |
|
null, |
131 |
|
"1", |
132 |
|
"2", |
133 |
|
"3", |
134 |
|
"4", |
135 |
|
"5", |
136 |
|
"6", |
137 |
|
"7", |
138 |
|
}; |
139 |
|
|
140 |
|
private static final String[] eras = { |
141 |
|
"BCE", |
142 |
|
"CE", |
143 |
|
}; |
144 |
|
|
145 |
|
private static final String[] ampms = { |
146 |
|
"AM", |
147 |
|
"PM", |
148 |
|
}; |
149 |
|
|
150 |
|
|
151 |
private static final Object[][] contents = |
private static final Object[][] contents = |
152 |
{ |
{ |
|
{ "localPatternChars", "GyMdkHmsSEDFwWahKzYeugAZ" }, |
|
|
{ "currencySymbols", currencySymbols }, |
|
|
{ "decimalSeparator", "." }, |
|
|
{ "groupingSeparator", "," }, |
|
|
{ "patternSeparator", ";" }, |
|
153 |
{ "percent", "%" }, |
{ "percent", "%" }, |
|
{ "zeroDigit", "0" }, |
|
|
{ "digit", "#" }, |
|
|
{ "minusSign", "-" }, |
|
|
{ "exponential", "E" }, |
|
154 |
{ "perMill", "\u2030" }, |
{ "perMill", "\u2030" }, |
155 |
|
{ "exponential", "E" }, |
156 |
{ "infinity", "\u221e" }, |
{ "infinity", "\u221e" }, |
157 |
{ "NaN", "\ufffd" }, |
{ "NaN", "\ufffd" }, |
158 |
{ "numberFormat", "#,##0.###;-#,##0.###" }, |
{ "minusSign", "-" }, |
159 |
|
{ "zeroDigit", "0" }, |
160 |
|
{ "decimalSeparator", "." }, |
161 |
|
{ "groupingSeparator", "," }, |
162 |
|
{ "digit", "#" }, |
163 |
{ "percentFormat", "#,##0%" }, |
{ "percentFormat", "#,##0%" }, |
164 |
{ "shortDateFormat", "M/d/yy" }, |
{ "currencyFormat", "\u00a4 #,##0.00;-\u00a4 #,##0.00" }, |
165 |
{ "mediumDateFormat", "MMM d, yyyy" }, |
{ "localPatternChars", "GyMdkHmsSEDFwWahKzYeugAZ" }, |
166 |
{ "longDateFormat", "MMMM d, yyyy" }, |
{ "currenciesDisplayName", currenciesDisplayName }, |
167 |
{ "fullDateFormat", "EEEE, MMMM d, yyyy" }, |
{ "currenciesSymbol", currenciesSymbol }, |
168 |
{ "shortTimeFormat", "h:mm a" }, |
{ "shortMonths", shortMonths }, |
169 |
{ "mediumTimeFormat", "h:mm:ss a" }, |
{ "months", months }, |
170 |
{ "longTimeFormat", "h:mm:ss a z" }, |
{ "shortWeekdays", shortWeekdays }, |
171 |
{ "fullTimeFormat", "h:mm:ss a z" }, |
{ "weekdays", weekdays }, |
172 |
|
{ "eras", eras }, |
173 |
{ "ampms", ampms }, |
{ "ampms", ampms }, |
174 |
{ "zoneStrings", zoneStrings }, |
{ "shortDateFormat", "yy/MM/dd" }, |
175 |
|
{ "mediumDateFormat", "yyyy MMM d" }, |
176 |
|
{ "longDateFormat", "yyyy MMMM d" }, |
177 |
|
{ "fullDateFormat", "EEEE, yyyy MMMM dd" }, |
178 |
|
{ "shortTimeFormat", "HH:mm" }, |
179 |
|
{ "mediumTimeFormat", "HH:mm:ss" }, |
180 |
|
{ "longTimeFormat", "HH:mm:ss z" }, |
181 |
|
{ "fullTimeFormat", "HH:mm:ss z" }, |
182 |
}; |
}; |
183 |
|
|
184 |
public Object[][] getContents() { return contents; } |
public Object[][] getContents() { return contents; } |