35 */
36 package sun.util.locale.provider;
37
38 import java.util.HashMap;
39
40
41 public class LocaleDataMetaInfo {
42
43 private static final HashMap<String, String> resourceNameToLocales =
44 new HashMap<String, String>(7);
45
46
47 static {
48 /* During JDK build time, #XXX_YYY# will be replaced by a string contain all the locales
49 supported by the resource.
50
51 Don't remove the space character between " and #. That is put there purposely so that
52 look up locale string such as "en" could be based on if it contains " en ".
53 */
54 resourceNameToLocales.put("FormatData",
55 " #FormatData_USLocales# | #FormatData_NonUSLocales# ");
56
57 resourceNameToLocales.put("CollationData",
58 " #CollationData_USLocales# | #CollationData_NonUSLocales# ");
59
60 resourceNameToLocales.put("TimeZoneNames",
61 " #TimeZoneNames_USLocales# | #TimeZoneNames_NonUSLocales# ");
62
63 resourceNameToLocales.put("LocaleNames",
64 " #LocaleNames_USLocales# | #LocaleNames_NonUSLocales# ");
65
66 resourceNameToLocales.put("CurrencyNames",
67 " #CurrencyNames_USLocales# | #CurrencyNames_NonUSLocales# ");
68
69 resourceNameToLocales.put("CalendarData",
70 " #CalendarData_USLocales# | #CalendarData_NonUSLocales# ");
71
72 resourceNameToLocales.put("AvailableLocales",
73 " #AvailableLocales_USLocales# | #AvailableLocales_NonUSLocales# ");
74 }
75
76 /*
77 * @param resourceName the resource name
78 * @return the supported locale string for the passed in resource.
79 */
80 public static String getSupportedLocaleString(String resourceName) {
81 return resourceNameToLocales.get(resourceName);
82 }
83 }
|
35 */
36 package sun.util.locale.provider;
37
38 import java.util.HashMap;
39
40
41 public class LocaleDataMetaInfo {
42
43 private static final HashMap<String, String> resourceNameToLocales =
44 new HashMap<String, String>(7);
45
46
47 static {
48 /* During JDK build time, #XXX_YYY# will be replaced by a string contain all the locales
49 supported by the resource.
50
51 Don't remove the space character between " and #. That is put there purposely so that
52 look up locale string such as "en" could be based on if it contains " en ".
53 */
54 resourceNameToLocales.put("FormatData",
55 " #FormatData_ENLocales# | #FormatData_NonENLocales# ");
56
57 resourceNameToLocales.put("CollationData",
58 " #CollationData_ENLocales# | #CollationData_NonENLocales# ");
59
60 resourceNameToLocales.put("TimeZoneNames",
61 " #TimeZoneNames_ENLocales# | #TimeZoneNames_NonENLocales# ");
62
63 resourceNameToLocales.put("LocaleNames",
64 " #LocaleNames_ENLocales# | #LocaleNames_NonENLocales# ");
65
66 resourceNameToLocales.put("CurrencyNames",
67 " #CurrencyNames_ENLocales# | #CurrencyNames_NonENLocales# ");
68
69 resourceNameToLocales.put("CalendarData",
70 " #CalendarData_ENLocales# | #CalendarData_NonENLocales# ");
71
72 resourceNameToLocales.put("AvailableLocales",
73 " #AvailableLocales_ENLocales# | #AvailableLocales_NonENLocales# ");
74 }
75
76 /*
77 * @param resourceName the resource name
78 * @return the supported locale string for the passed in resource.
79 */
80 public static String getSupportedLocaleString(String resourceName) {
81 return resourceNameToLocales.get(resourceName);
82 }
83 }
|