Most of the current software has a trend of multi-country development. To write a software program, consider the use of other non-local users. The most important thing is to make menus multilingual.
First, you need to prepare the properties file. Several files must be prepared in several languages.
For example, resources_en.properties in English, resources_zh.properties in Chinese, resources_ja.properties in Japanese, and so on.
The content is saved as the text to be displayed in the menu. For example, in an English property file, there is a definition: settings = settings, which must also have the corresponding definition: settings = xxx. XXX is a character obtained by converting Chinese or Japanese to Unicode, for example, "/u80fd/u530d ".
The content of the locale and resourcebundle classes is mainly used in the encoding process. In this way, the program automatically corresponds to the required attribute file, obtains the value of a specific string, and then displays menus in different languages. Let's take a look at the JDK and try to write code segments.