For users, a Web program supporting the internationalization has several forms below
1. According to the user's browser, the displayed language (no need for user intervention) 2. Provide user selection, the user decides to use what language is used according to its own needs, and the first two. The system automatically selects a language, but at the same time Users choose as needed
It is a very convenient thing to develop an internationalization program using the Struts. Let's see how the first two are
1. This is the easiest way, you don't need to modify any programs, just translate the resource files over again and nam them according to the requirements of the internationalization program. For example, ApplicationResource_en_us.properties ApplicationResource_zh_tw .properties. Although automatically gives users to display the language to be displayed, sometimes because the browser itself, or if the user wants to see other languages, there is no way.
2. This is a common way, by the user yourself to select the language you want to display. The general situation is to increase the language of the language on the home page or login page. After the user selects one of the logins, it is displayed in the language selected by the user. But after the user is logged in, you must save the language selected by the user and let the program are Ok, now The STRUTS framework is still very thoughtful when achieving international apps, so you need to do it is translation. Finally, I remember two points: 1. The character set of the page must be UTF-8, for example: <% @ page language = "java" contenttype = "text / html; charSet = UTF-8"%> 2. All of the page Tips should be defined in the resource file