Non-original, source network. Thanks to the original author for providing such wonderful articles. Address: http://www.blueidea.com/design/doc/2008/5548.asp
People use their own eyes and minds to feel the color. It is not only physical, but also
Once looked for a JS version of the, but to the UTF8 code can not be used, and then produced a self write a thought. In fact, the principle of the implementation of this code is very simple, just a replacement character set process, I believe most
This article is mainly on the simplified Chinese conversion of Traditional Chinese implementation code is introduced, the need for friends can come to the reference, I hope to help you. The code is as follows: var default_isft = 0 //default
Copy Code code as follows:
var default_isft = 0//default is traditional, 0-simplified, 1-Traditional
var stranit_delay = 50//Translation delay millisecond (this is designed to let the Web page appear smoothly first)
--code start, do not
This article is an example of how PHP Chinese and simplified are converted to each other. Share to everyone for your reference. The specific analysis is as follows:
The following code uses the traditional and Simplified Chinese library tables to
to
// Simulates the simplified and traditional Conversion Function plug-ins in the Language Pack!VaR default_isft = 0 // whether the default is traditional, 0-simplified, 1-traditionalVaR stranit_delay = 20 // translation delay in milliseconds
Recently, Baidu is popular with vertical la s, some of which are used for posting and swearing, so I wrote a line to fight back ~~~
1. package org. test;2.
3. import java. util. Collections;4. import java. util. HashMap;5. import java. util. Map;6.
7
Once looked for a JS version of the, but to the UTF8 code can not be used, and then produced a self write a thought. In fact, the principle of the implementation of this code is very simple, just a replacement character set process, I believe most
recently developed a traditional version of the Web site, on the Internet to find a more popular simplified switch JS implementation, but later found that some pages will be stuck to death, in response to this problem, there is a good solution
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.