Java ResourceBundle introduction, javaresourcebundle
Public abstract class ResourceBundle
Extends Object
Parent class of the following classes:
ListResourceBundle, PropertyResourceBundle
A resource bundle contains language-specific objects. When
The Java language provides the resourcebundle class to process resource files of the properties type.
This article provides an explanation of the resourcebundle class.
Before starting, Let's explain what resources files of the properties type are.
Public abstract class ResourceBundleExtends ObjectThe parent class of the following classes:ListResourceBundle, propertyResourceBundleResource bundles contain locale-specific objects. When a program requires a locale-specific resource, such as a
Java resourcebundle is a useful tool that can be conveniently used to implement Software Internationalization and localization functions. Because resourcebundle can automatically search for resource files (. properties files) in a certain culture
Constants are often used in the program. If they are directly written in the program, they must be re-compiled when these strings are changed, such as the database driver, URL, user name, and password information when writing the database
Constants are often used in the program. If they are directly written in the program, they must be re-compiled when these strings are changed, such as the database driver, URL, user name, and password information when writing the database
Introduction of properties File
The properties file in Java is a configuration file, mainly used to express configuration information, the file type is *.properties, the format is a text file, the file content is the format is "key = value" format,
Javaweb Internationalization
DateFormat: A tool class that formats dates and is itself an abstract class;
NumberFormat: the character class that formats numbers into numeric strings, or currency strings;
Messageformat: You can format pattern
DateFormat: A tool class that formats a date, itself an abstract class;NumberFormat: A character class that formats numeric to numeric strings, or currency strings;Messageformat: Can format pattern string, pattern string: string with placeholder:
Java resource localization and Internationalization
Resource Package
When writing an application, you need to deal with some information related to locale. For example, some static text on the page is expected to be displayed in a language
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.