Image loading in multiple languages

Source: Internet
Author: User

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.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.