public class I18NUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
I18NUtil.ExtendedProperties |
static class |
I18NUtil.SaxHandler |
static class |
I18NUtil.XmlResourceBundle |
Constructor and Description |
---|
I18NUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
clear() |
static ResourceBundle |
getResourceBundle(String resourceName,
Locale locale) |
static Properties |
xmlToProperties(InputStream in,
Locale locale,
Properties properties)
将自定义XML格式的属性文件转换成
Properties 实例 |
public static ResourceBundle getResourceBundle(String resourceName, Locale locale)
public static void clear()
public static Properties xmlToProperties(InputStream in, Locale locale, Properties properties)
Properties
实例
自定义XML资源文件的格式为:
<resource>
where "locale 1", "locale 2" are valid Locale
strings.
<property key="key">
<value xml:lang="locale 1">Some value</value>
<value xml:lang="locale 2">Some value</value>
...
</property>
...
</resource>
in
- XML file InputStreamlocale
- The desired localeproperties
- Optional Properties object to populateCopyright © 2016 huihoo. All rights reserved.