[轉] 如何像 google 一樣,根據瀏纜器的語言來判斷頁面顯示何種語言,是簡體就顯簡體,是繁體就顯繁體,是英語就顯英語。 

navigator.systemLanguage和navigator.userLanguage的效果是一樣的嗎?
navigator.userlanguage是操作系統裡的區域選項的結果吧?


defauldpage.asp
<% if Instr(1,Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"), "es",1)>0 then
response.redirect("spanishpage.asp")
end if %>

Page into English, my defauld language


Page into English, my defauld language



defauldpage.asp
<% if Mid(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"), 1,2)="es" then
response.redirect("spanishpage.asp")
end if %>

Page into English, my defauld language


Page into English, my defauld language



asp可以直接用,session.codepage 就能判斷了!

-----
arrow
arrow
    全站熱搜

    Pescados 發表在 痞客邦 留言(0) 人氣()