Using the ResourceBundle to validate data.
使用ResourceBundle来验证数据。
The answer lies in how a ResourceBundle is created.
答案取决于ResourceBundle是如何创建的。
How do you make the ResourceBundle available at application startup time?
在应用程序启动时如何使得ResourceBundle有效?
The typical use of a ResourceBundle is to handle this type of locale-related difference.
ResourceBundle的一种常见用法就是处理这种类型的与地区有关的差异。
You could retrieve the mask string from a localized ResourceBundle using the same technique defined here.
您可以使用与这里相同的技巧来从一个本地化的ResourceBundle中获得掩码字符串。
Not shown here is the use of a ResourceBundle (which is typically used with ChoiceFormat) to get those strings.
这里没有说明的是如何使用ResourceBundle(它通常与ChoiceFormat一起使用)来获得那些字符串。
When the code requests any other string from the ResourceBundle, the string from messages_en.properties is used, if one exists.
当代码向ResourceBundle请求任何其他字符串时,如果messages_en . properties中有这样的字符串,就使用其中的字符串。
It must contain the fully qualified path to the ResourceBundle containing the localized messages — in this case, ApplicationMessages.
它必须包括到含有地方化信息(本例中是ApplicationMessages)的ResourceBundle的完整的路径。
The ResourceBundle instance and the Locale related to Messages also change, so that all text displayed on other UIs changes accordingly.
与Messages关联的ResourceBundle实例和Locale也会变化,因此其他用户界面上显示的所有文本也会相应地变化。
Through a Messages class implemented using a ResourceBundle, you can easily get a multilingual text from the corresponding properties file.
通过使用ResourceBundle实现的Messages类,可以很容易地从相应的属性文件中获得多语言文本。
The strings in the ResourceBundle are usually the text that appears in the application, but they can be anything specific to a given locale.
ResourceBundle 中的字符串通常是出现在应用程序中的文本,但是也可以是特定于某个地区的任何东西。
To overcome this problem, I used an Eclipse plugin called Eclipse ResourceBundle Editor, which allows you to convert and create resource bundles for different languages.
为了克服这个问题,我使用了一个称为EclipseResourceBundleEditor的Eclipse插件,它允许您为不同语言转换并创建资源包。
The Bean Validation specification lets you externalize and internationalize the constraint error messages through a classic file system based ResourceBundle localization.
Bean验证规范能让你通过基于ResourceBundle本地化的标准文件系统来外部化和国际化约束错误消息。
If you wanted to change the code so that you could change the ResourceBundle dynamically, you would need to change the Messages class so that its fields and methods weren't static.
如果您想更改代码,以便动态地改变ResourceBundle,那么需要修改messages类,使它的字段和方法不是静态的。
Although the code doesn't focus on extracting regular expressions from a ResourceBundle, it does include a good example of extending the default behavior of the formatted text field.
虽然其中的代码不是着重于从ResourceBundle提取正则表达式,但是它的确包含了一个扩展格式化文本域的默认行为的好例子。
Although the code doesn't focus on extracting regular expressions from a ResourceBundle, it does include a good example of extending the default behavior of the formatted text field.
虽然其中的代码不是着重于从ResourceBundle提取正则表达式,但是它的确包含了一个扩展格式化文本域的默认行为的好例子。
应用推荐