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的一种常见用法就是处理这种类型的与地区有关的差异。
JSF also USES ResourceBundle as a localization Pack, which is backed up by a set of properties files.
JSF也使用ResourceBundle作为地方化的Pack,它由一系列属性文件来支持。
You could retrieve the mask string from a localized ResourceBundle using the same technique defined here.
您可以使用与这里相同的技巧来从一个本地化的ResourceBundle中获得掩码字符串。
Remember that the generated code that creates the ResourceBundle specifies the filename messages.properties.
记住,创建ResourceBundle的代码指定了文件名messages . properties。
Not shown here is the use of a ResourceBundle (which is typically used with ChoiceFormat) to get those strings.
这里没有说明的是如何使用ResourceBundle(它通常与ChoiceFormat一起使用)来获得那些字符串。
Please note that if the language characters were supported, it was not required to use the ResourceBundle Editor.
请注意,如果支持该语言字符,则不需要使用ResourceBundleEditor。
When doing the lookup, the ResourceBundle class takes care of finding the correct resources for the system language code.
在查询过程中,resourcebundle类负责为系统语言代码查找正确的资源。
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中有这样的字符串,就使用其中的字符串。
Make sure that your ResourceBundle actually contains the messages with the key for the locales that you specify with these tags.
确保您的ResourceBundle包含您用这些标签指定位置的主键信息。
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 中的字符串通常是出现在应用程序中的文本,但是也可以是特定于某个地区的任何东西。
In this case the ResourceBundle class (see Listing 3) can be used to look up translated string constants and to include the internationalized strings in the XML data.
在这种情况下,可以使用resourcebundle类(请参阅清单3)来查找已翻译好的字符串常量,并将国际化字符串置入xml数据中。
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提取正则表达式,但是它的确包含了一个扩展格式化文本域的默认行为的好例子。
The message-bundle element represents a set of localized messages, and will cause your application instance to be populated with the messages contained in the specified ResourceBundle.
消息捆绑元素代表了一套地方化的信息,并且将使您的应用程序实例同指定的ResourceBundle中包含的信息组装起来。
The message-bundle element represents a set of localized messages, and will cause your application instance to be populated with the messages contained in the specified ResourceBundle.
消息捆绑元素代表了一套地方化的信息,并且将使您的应用程序实例同指定的ResourceBundle中包含的信息组装起来。
应用推荐