예전에 신발진흥센터 인가? 아무튼 그 사이트 작업을 할때 만들어 두었던 코드를 다시 사용하게 될줄이야..
아무튼 경험이 많으면 손발이 편해요. ㅎㅎ
다음은 브라우저의 언어정보를 알아내는 자바스크립트이다.
if (navigator.appName == 'Netscape') var language = navigator.language; else var language = navigator.browserLanguage; /*------------------------------------------------------------- Netscape instructions: In Netscape, find the language you want to redirect by going to Edit Menu --> Preferences... Then click the '+' box next to 'Navigator' and click 'Languages' Click 'Add' then find the languages you want and add them below. --------------------------------------------------------------- Microsoft Internet Explorer instructions: In MSIE, find the language you want to redirect by going to Tools Menu --> Internet Options... Then click the 'Languages' button near the bottom of the page. Click 'Add' then find the languages you want and add them below. -------------------------------------------------------------*/ if (language.indexOf('en') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('nl') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('fr') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('de') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('ja') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('it') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('pt') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('es') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('sv') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else if (language.indexOf('zh') > -1) document.location.href = 'http://www.kfiglobal.or.kr/eng/'; else document.location.href = 'http://www.kfiglobal.or.kr/'; //기본적으로 한국어.