无聊写的,可以让你的网站有 多语言
yyhfy.asp
<%
Dim write
Dim fileSysObj, tf, yyhid
yyhid = "yyhid.inc"
yyhid = LEFT(Server.Mappath(Request.ServerVariables("PATH_INFO")), InStrRev(Server.Mappath(Request.ServerVariables("PATH_INFO")), "\")) & yyhid
Set fileSysObj = createObject("Scripting.FileSystemObject")
IF (fileSysObj.FileExists(yyhid)) Then
Set tf = filesysobj.OpenTextFile(yyhid, 1)
yyhid= tf.Read(2)
tf.Close
ELSE
yyhid= 1
END IF
%>
<% if int(right(yyhid,1))=1 then %>
<div align="center">
<table width="100%" border="0">
<tr>
<td><div align="center">将此页翻译为: <a href=# onClick="JavaScript:window.open('http://www.worldlingo.com/wl/translate?wl_lp=ZH_CN-ZH_TW&wl_fl=2&wl_g_table=-3&wl_url='+document.location+'&k=1','_self','')">中文版(繁)</a> <a href=# onClick="JavaScript:window.open('http://www.worldlingo.com/wl/translate?wl_lp=ZH_CN-EN&wl_fl=2&wl_g_table=-3&wl_url='+document.location+'&k=1','_self','')">英文版</a> <a href=# onClick="JavaScript:window.open('http://www.worldlingo.com/wl/translate?wl_lp=ZH_CN-JA&wl_fl=2&wl_g_table=-3&wl_url='+document.location,'_self','')">日文版</a></div></td>
</tr>
</table>
</div>
<%end if%>
<%if int(right(yyhid,1))=2 then %>
<div align="center">
<table width="100%" border="0">
<tr>
<td width="1241" align="center" valign="middle"><div align="center">将此页翻译为:
<select name="yyhselect">
<option value="EN" selected> 英文版</option>
<option value="ZH_CN">中文版(简)</option>
<option value="ZH_TW">中文版(繁)</option>
<option value="JA"> 日文版</option>
</select>
<input name=Submit type=submit onClick=JavaScript:window.open('http://www.worldlingo.com/wl/translate?wl_lp=ZH_CN-'+yyhselect.value+'&wl_fl=2&wl_g_table=-3&wl_url='+document.location,'_self','') value=翻译>
</div></td>
</tr>
</table>
</div>
<%end if%>
yyhid.inc
1
注意一下啊。这里有两种样式,在yyhid.inc里。改成1就是第一种样式,改2就是第二种。
在任何页面加上<!-- #include file="yyhfy.asp" --> 就OK了。哈哈。这个是最简单好写的