Simplified Chinese to traditional Chinese of implementation code

  • 2020-03-30 01:05:06
  • OfStack


var Default_isFT = 0        //Default traditional, 0- simplified, 1- traditional & traditional;  
var StranIt_Delay = 50 //Translation delays by milliseconds (this is supposed to make the page appear smoothly first) & NBSP;  

//-- code starts, don't change it --& NBSP;  
//Transform text & NBSP;  
function StranText(txt,toFT,chgTxt)  
{  
    if(txt==""||txt==null)return ""  
    toFT=toFT==null?BodyIsFt:toFT  
    if(chgTxt)txt=txt.replace((toFT?" Jane ":" numerous "),(toFT?" numerous ":" Jane "))  
    if(toFT){return Traditionalized(txt)}  
    else {return Simplized(txt)}  
}  
//Converts objects, using recursion, to strip layer by layer to the text & cake;  
function StranBody(fobj)  
{  
    if(typeof(fobj)=="object"){var obj=fobj.childNodes}  
    else   
    {  
        var tmptxt=gb2big5_Obj.innerHTML.toString()  
        if(tmptxt.indexOf(" Jane ")<0)  
        {  
            BodyIsFt=1  
            gb2big5_Obj.innerHTML=StranText(tmptxt,0,1)  
            gb2big5.title=StranText(gb2big5.title,0,1)  
        }  
        else  
        {  
            BodyIsFt=0  
            gb2big5_Obj.innerHTML=StranText(tmptxt,1,1)  
            gb2big5.title=StranText(gb2big5.title,1,1)  
        }  
        setCookie(JF_cn,BodyIsFt,7)  
        var obj=document.body.childNodes  
    }  
    for(var i=0;i<obj.length;i++)  
    {  
        var OO=obj.item(i)  
        if("||BR|HR|TEXTAREA|".indexOf("|"+OO.tagName+"|")>0||OO==gb2big5_Obj)continue;  
        if(OO.title!=""&&OO.title!=null)OO.title=StranText(OO.title);  
        if(OO.alt!=""&&OO.alt!=null)OO.alt=StranText(OO.alt);  
        if(OO.tagName=="INPUT"&&OO.value!=""&&OO.type!="text"&&OO.type!="hidden")OO.value=StranText(OO.value);  
        if(OO.nodeType==3){OO.data=StranText(OO.data)}  
        else StranBody(OO)  
    }  
}  
function JTPYStr()  
{  
    return ' Ai ailing day everyone would fly in love coat the dam pendulum "defeat went for trip to help bind the pound has been stripped full treasure to bao generation bei barium when they prepare the vigilant pen finish die closed side plait to demote become tense debate braided turtle dial faces the marina bin Bin flat bread bowl platinum barge bligh fill and silkworm residual shimmering pale face miserably pathetic toilet tank storehouse side layer - the copies of the test made with mixed cicada admire about around the shovel is produced in fibrillation field long taste of intestinal factory chang chao car dust from lining support said to punish Chen cheng import chi ChiChi shame tooth on blunt insect pet domain for raise silk ugly development touch in mass storage cabinet kitchen hoe young boils into pure la gen hammer quit word gives astute onion chimney from clump together to take wrong bear single loan he nan shan bile fears Christmas play when block party to swing shift dao island prayer guide stolen mat electric lamp burn deng enemy polyester pass associating lake fishing the overlapping spy nail fold the top east ingot order dynamic building frozen dou gives birth to read alone on plating forging broken satin against the team of tons, blunt took the goose for my knowledge Evil hungry son, two hair off valve bait methods vanadium vanadium bother van selling rice's visit to the grave of dispute spinning fly waste fee courageously anger dung FengFengFeng crazy von seam biting wind chicken skin spoke to fondle auxiliary fu after negative obituary woman tied the calcium cover dry out stem from jiangxi mountain just steel steel post gao picks rested chrome a pigeon pavilion to 龚宫巩 gong hook groove structure and purchasing method of gu cut off enough view pavilion used penetration wide best rail gauge silicon to turtle deceit in tank a lurid executioner roll roll pan countries Han Han worshiping cranes, horizontal boom hong red pot of armor Shanghai family breakdown after China painting cross words with bad call risk haun huan ring also slow in melt lies with fai wong will destroy bribes indecent stewed link up his painted blue muddy group received goods disaster strike machine product hunger libel, chicken performance level made an album to squeeze a few thistle agent dhi meter remember international after ji clamp pod buccal jia potassium price driving fighters nut depicting difficult garami between cocoon monitoring caustic alkali pick up JianJian commend minus sill as a practice base to see key ship Sword one gradually splashes countless pulp oar prize about jiang stir sauce glue pouring JiaoJiao hinge spare foot dumplings in wring its more straw order correction section stems surprised by the neck painful race to net rectify stables old colt on static mirror diameter for the cuckoo silk knot JieJie commandment according to fear saw play tight kam only wish into jin shines all strength JingJiao definitely tactic jun jun forces open a kay shell class Ken Ken dig library pants kua block ore than a wide kuang of deficient person peep feed collapse widened wax wax lai lai to blue bar block basket aperture LanLan Lan tabled took lazy cable rotten excessive sludge lowe waterlogging music in the base class tears hedge radium from the carp li LiLiLi through drain transferred to two league lotus even flow ripple shade the folding of the unit face practice food cold chain love refined two dare cure liao chains hunting in the neighboring scales winds bell LingLingLing Clinton age get distillation Liu Long deaf Long cage (3) building ridge over hug Lou basket reed Lou cranial captive halide approach lu lu lu lu, furnace donkey lu lu aluminum couple of repeatedly About filter green mountain twin twin luanhe river disorderly lun round Aaron shimron Laura luo lun lun theory logic mule LuoLao mom tamar code day horse gong dominant scold you buy wheat sell Michael vein from Man pretty full. Cat anchor rivet trade yao mildew magnesium door tightness are manganese dream mystery "find continous myanmar temple destroyed Benjamin fujian wong Ming goes for sodium mu, difficult to scratch the brain so make loose greasy nian twist stuffed birds gritting nie tweezers nickel twist hideous ning ning Ning toggle button pus, strong agricultural malaria, the gulls ou ou retting plate spray PangGuoAi compensate peng cheated wave frequency lean apple with a review of the spilt a flapping spread spectrum umbilical park qi did ride a rev gas abandon boasts a guy stand soldering lead moving sign modest money pliers dive light task willing gun qiang qiang strong wall grab the shovel bridge Qiao Qiao become warped qiao secretly qin pro light hydrogen worthy of the celebration, please pour Joan became poor area body displacement caries zygomatic right to advise but magpie rao scrambling around the thermal toughening recognize threading a glorious velvet soft sharp leap leap with Mr Gill the umbrella for SAO acerbity kill yarn Sieve sun shan shan Shan repair injury is a deterrent to admire the burning salt was taken on credit a gentlemen and acoustic line umpire aunts renal permeability - saint lion wet when resin corrosion try how to potential release act the role of visual life of beast pivot lost book redeem belongs to the art of tree number of vertical who handsome double tax shun said shuo wire feeding shrugged to recognize the unintelligent litigation recite verses trembling Sue v. though lu su was old sun damage of bamboo shoot suo suo lock otters tart carry spread corruption collapsed beach tan talk with soup hot tao altar of taeniasis teng drawer article posted transcripts of antimony topic body iron hall listening to the hydrocarbon copper system crashing head figure painting group moulting Tuo carry camel elliptic depression socks around nets of curved bay dense wei spare for weifang diesel d WeiWei pseudo weft call WeiWen smell developments of rotor vortex nest blare tungsten grain stability asked urn no weeds dock fog for miss wu wu falsely tin offer fine shrimp and incoming XiXi play gorge spiderman narrow mansion shovel salty fresh fiber show risks now xian xian bit idle compartments with the line of the xian township close ring filling envy xiao pin xiao yu xie association held together with Harmonic writing about xie xie zinc trouble with heavy rust embroidery virtual boo must Xu Xuxu hin suspension chosen for tinea ribbon learn great trainer training - Johnson found pressure crow duck dumb and stunned yan yan yan Yan Yan smoke compounds inkstone, proverbs check Yang sores to Yang Yang Yang a sample page yao shakes a communal drug ye yao yao kiln industry leaves traces of medical iridium h meter yi ant arts million have YiYi discussion/translation of different gets Yin Yin silver drinking cherry baby eagle should the tassel jade-like stone hotaru camp fluorspar flies clever yo have servants carbuncle gave wing chung optimal care mail uranium Jude swim and fish fishing lure entertainment with island language xu imperial prison reputation yu spend their honeymoons. / / deep shafts garden part flange far to jump about key YueYueYue cloud Yun reading well meteorite carrying aggregates Yun halo rhyme complex disaster load saved temporarily praise spoils cut jujube focal began to choose the jersey dirty thief give Mr. Zagreb felt light cut rolling rolling Zha brake cheat lent debt come stack war bursts go up account credit expansion zhang zhao zhi quote germanium this zhen town of needle detection diagnosis matrix Zheng zheng Zheng frame zheng zhi throw signs the woven position of board paper quality clock end of swelling of the principal axis wrinkle day flash candle out told the pig all over turn casting special built in brick making storage pile loading makeup zhuang zhuang shape cone fat drop compose we turbidity, endowment stains trace to sum total longitudinal zou curse group and drill to clock yao is fierce and drainage board more than fog in the chain ';  
}  
function FTPYStr()  
{  
    return ' ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������叠����������������������������� ������������������������������������������������������������������������������������矽�����������������������後�����������������������������������夥������������������������������������������������������� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ��������������������������������������������麽�����������������������������������������甯����������������������������������������������������������������������������������������������������������������� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ��������������������������������������������������������������������������� ';  
}  
function Traditionalized(cc){  
    var str='',ss=JTPYStr(),tt=FTPYStr();  
    for(var i=0;i<cc.length;i++)  
    {  
        if(cc.charCodeAt(i)>10000&&ss.indexOf(cc.charAt(i))!=-1)str+=tt.charAt(ss.indexOf(cc.charAt(i)));  
        else str+=cc.charAt(i);  
    }  
    return str;  
}  
function Simplized(cc){  
    var str='',ss=JTPYStr(),tt=FTPYStr();  
    for(var i=0;i<cc.length;i++)  
    {  
        if(cc.charCodeAt(i)>10000&&tt.indexOf(cc.charAt(i))!=-1)str+=ss.charAt(tt.indexOf(cc.charAt(i)));  
        else str+=cc.charAt(i);  
    }  
    return str;  
}  

function setCookie(name, value)     //The cookies set    
{  
    var argv = setCookie.arguments;  
    var argc = setCookie.arguments.length;  
    var expires = (argc > 2) ? argv[2] : null;  
    if(expires!=null)  
    {  
        var LargeExpDate = new Date ();  
        LargeExpDate.setTime(LargeExpDate.getTime() + (expires*1000*3600*24));  
    }  
    document.cookie = name + "=" + escape (value)+((expires == null) ? "" : ("; expires=" +LargeExpDate.toGMTString()));  
}  

function getCookie(Name)            //Cookies to read    
{  
    var search = Name + "="  
    if(document.cookie.length > 0)   
    {  
        offset = document.cookie.indexOf(search)  
        if(offset != -1)   
        {  
            offset += search.length  
            end = document.cookie.indexOf(";", offset)  
            if(end == -1) end = document.cookie.length  
            return unescape(document.cookie.substring(offset, end))  
         }  
    else return ""  
      }  
}  

var gb2big5_Obj=document.getElementById("gb2big5")  
if (gb2big5_Obj)  
{  
    var JF_cn="ft"+self.location.hostname.toString().replace(//./g,"")   
    var BodyIsFt=getCookie(JF_cn)  
    if(BodyIsFt!="1")BodyIsFt=Default_isFT  
    with(gb2big5_Obj)  
    {  
        if(typeof(document.all)!="object")  //Non-internet explorer & cake;  
        {  
            href="javascript:StranBody()"  
        }  
        else  
        {  
            href="#";  
            onclick= new Function("StranBody();return false")  
        }  
        title=StranText(" Click to browse in traditional Chinese ",1,1)  
        innerHTML=StranText(innerHTML,1,1)  
    }  
    if(BodyIsFt=="1"){setTimeout("StranBody()",StranIt_Delay)}  
} 

< A name = "gb2big5" id = "gb2big5" style = "color: # FF0000" > Numerous Chinese / A>
< Script Language = Javascript Src = "gb2big5. Js >" < / Script>

Related articles: