What are properties files in Java

[size = medium] [b] 1. Create a corresponding properties file in the resource folder of the project [/ b] [/ size].
[size = small]
English file: validator_en_US.properties
Chinese file: validator_zh_CN.properties
[/ size]
[size = medium] [b] 2. Add the appropriate content in Chinese and English to the appropriate file [/ b] [/ size]

[size = medium] [b] 3. Open the transcoding of the Chinese properties file [/ b] [/ size].
[size = small]
Use native2ascii to transcode
[/ size]
(1) Open the directory in which the validator_zh_CN.properties file is located

(2) Convert the file to ASCII format

Content after conversion

[size = medium] [b] 4. Use Util to view the contents of the properties [/ b] [/ size]

[Color = blue] [size = medium] [b] additional note [/ b] [/ size] [/ color]
[size = medium] [color = gray]
(1) Use native2ascii transcoding
native2ascii inputFile.txt outputFile.txt
(2) Use Java to read properties
Read the ResourceBundle bundleSC
= ResourceBundle.getBundle ("validator", Locale.TRADITIONAL_CHINESE);
① The validator corresponds to the file name in validator_zh_CN.properties
② Locale.TRADITIONAL_CHINESE stands for Chinese
Locale.US stands for English
Read the attribute value String value = bundleUS.getString ("key");
[/ color] [/ size]