The system requires multiple languages: Chinese and English. The relevant content is written in Two XML files, respectively. For example:
< Root >
< Resource Name = " Versionname " > Version </ Resource > <Resource Name = "logout"> logout </resource>
</ Root >
The processing of multiple languages is defined in a class. The front-end PAGE method is as follows:
< TD Width = "7%" Align = "Right" >
<% = ResourceManager. getstring ( " Versionname " ) %> <% -- Account version -- %>
</ TD >
This is text replacement. At the same time, images must be replaced. Before multi-language images are not implemented, images are controlled through CSS files.
< TD ID =" SCT-Log " Width = "225" Height = "50" Align = "Left"> </ TD >
Set the background image of the SCT-log in the CSS file. After multiple languages are required, set the background image in CSS, but there are two. For example, you can set pictures in Chinese and English in SCT-log-ZH and SCT-log-En respectively. The front-end still wants to be set <% = ResourceManager. getstring ( " SCT-Log " ) And add the following configurations to the two xml configuration files: < Resource Name = " SCT-Log " > SCT-log-ZH </ Resource and Resource Name = " SCT-log " >< /Span> SCT-log-en resource . ResourceManager. getstring ( " versionname " )
< TD Width = "7%" Align = "Right" >
<% = ResourceManager. getstring ( " Versionname " ) %> <% -- Account version -- %>
</ TD >
Prompt,<%=ResourceManager. getstring ("SCT-Log")%> In
< TD ID =" <% = ResourceManager. getstring (" SCT-Log " ) % > " Width = "225" Height = "50" Align = "Left"> </ TD >
Is not prompted. In addition, there are quotation marks, which can be used. It seems that the frontend and backend processes are really different. Writing in the background is absolutely incorrect. My front-end HTML and JS are really amazing. Record it for future reference.