Difficultover problem!

xiaoxiao2021-03-06  69

http://www.waynedeng.com/blog/showlog.asp?cat_id=25&log_id=481 Company's website needs to provide three languages: English, Traditional Chinese and Simplified Chinese. English and Chinese are different, the language is too large, and can only be stored in two data fields. However, traditional and simplificions are generally only one, and then automatically convert them through a program.

It has been automatically converted with kanhan (http://www.kanhan.com/), Kanhan needs a dedicated server, such as translate.bciasia.com, then look at traditional websites (BIG5 encoding) is Translate.bciasia. COM / B5 / www.bciasia.com, equivalent to a translated agent intermediary. I feel that this way is not very good, and the general form is www.bciasia.com/b5. For example, IBM website architecture is www.ibm.com/cn, www.ibm.com/tw....

Now I want to be a profile of the transition, and I feel really not simple. No wonder Kanhan can go public!

First of all, the first question is that the internal code conversion, the simplified general is the internal code, and there is a lot of problems with the internal code of BIG5. It is generally converted through a conversion comparison table. Some Chinese characters are converted to a question mark! Below is a relatively simple conversion method.

The following is the code snippet: '****** Simultaneous interchangeable GB -> big5 or big5 -> gb ****************' parameter sstr is required to convert The text 'parameter iconver is the type of transformation, indicating that Traditional to Simplified Conversion, indicating Simplified to Traditional Conversion Function GBBIG5 (SSTR AS String, Iconver AS Integer) AS Stringon Error ResMe Next Dim Stringonver = 1 Then 'BIG5 -> GB STR = StrConv (sStr, vbFromUnicode, & H804) GBBIG5 = StrConv (STR, vbUnicode, & H404) ElseIf iConver = 2 Then' GB -> BIG5 STR = StrConv (sStr, vbFromUnicode, & H404) GBBIG5 = STRCONV (STR, Vbunicode, & H804) end if end function

Some internal code translations are better, such as a GBTOBIGOCX control (BIG2GB2.ZIP). It is basically convertible, but the following problems still cannot be resolved. It is often unheile between the traditional Chinese characters! This is a fatal issue. For example: understanding -> Understand the Look -> Look; "Standard" Trail is "Standard", but the "Standard" is a "standard" ... there are several language habits, such as the same name It is not the same, it will not be listed.

Methods to solve this problem are generally an end library that separates one by one. Of course, there are still many software doing very good, such as the Kanhan mentioned above is Microsoft's Word. There is a simple transition function in Word. I think that I envisaged if I can use Word to convert it?

In fact, it is also very simple:

The following is the code fragment: Dim w As New Word.DocumentFunction Convert (ByVal s) As StringWith w.Content .Text = s .TCSCConverter WdTCSCConverterDirection: = _ wdTCSCConverterDirectionSCTC, CommonTerms: = True, UseVariants: = True Convert = .TextEnd WithEnd FunctionWord in Dynamic transitions can also define phrases, and considering the habits of Hong Kong, Macao and Taiwan, it can be said that the effect of translation is not bad. However, the translation speed is very slow, and then a problem is found - it does not perform internal conversion, that is, the result of the conversion is the so-called false traditional, it seems to be zh-chs to zh-cht? As for what is zh- CHS and EN-CHT are not clear, but the encoding must be set to GB in IE. I don't know if the internal code in Traditional Word is BIG5, this needs to be tried. Finally, there is no way, or only use Kanhan, I don't use XMLHTTP to access Translate.bciasia.com/b5/www.bciasia.com and then output the results in CFM. Oh, the last killer! Reference: 1, http://community.9cbs.net/expert/topic/3458/3458436.xml? Temp = .80158632, http: //en.wikipedia.org/wiki/wikipedia_talk:% E7% B9% 81 % E7% AE% 80% E4% BD% 93% E9% 97% AE% E9% A2% 983, http://www.cnblogs.com/snowwolf /articles/2735.html4, http: //www.china -askpro.com/msg14/QA45.SHTML

转载请注明原文地址:https://www.9cbs.com/read-87777.html

New Post(0)