/** * */ var userLang = navigator.language || navigator.userLanguage; $.lang = {}; $.lang.ko = { // 공통 common_title : '서울과학기술대학교 생활관거주호실신청시스템' , common_home : '홈으로' , common_logout : '로그아웃' , common_menu_notice : '공지사항' , common_menu_appl : '생활관거주호실신청' , common_index_title : '서울과학기술대학교 생활관 호실신청' , index_login_id : '학번' , index_login_pw : '비밀번호' , index_login_btn : '로그인' , index_login_caution : '유의사항' , index_login_caution1 : '※ 이 프로그램은 생활관 거주호실 신청 기간에만 운영되는 재학생 및 신입생을 위한 호실신청 전용 프로그램입니다.' , index_login_caution2 : '접속방법 :학번(신입생은 입시지원번호) / 패스워드(학생포탈과 동일 / 신입생은 주민번호 앞 6자리)' , index_login_caution3 : '사용 후 반드시 프로그램을 종료하시기 바랍니다.' , page_tit : '서울과학기술대학교 생활관거주호실신청' , page_ymst : '모집년도학기' , page_year : '년도학기' , page_stnt_id : '학번' , page_stnt_nm : '이름' , appl_info : '신청정보' , appl_dong : '합격학사' , appl_dong2 : '신청학사' , appl_type : '합격호실유형' , appl_meal : '식사구분' , appl_2smr : '2학기거주신청' , appl_install : '분납신청' , room_floor_sel : '층선택' , room_floor_all : '전체' , room_please_sel : '빈 호실을 선택하시기 바랍니다.' , room_app_ing : '신청가능' , room_app_cmp : '신청완료' , room_app_close : '신청마감' , div_app_title : '해당 호실을 신청하시겠습니까?(기존 신청한 호실은 취소됩니다.)' , div_app_ok : '신청' , div_app_cancel : '취소' , div_app_roommate : '룸메정보' , div_intro_title : '생활패턴 및 자기소개 입력' , div_intro_life : '생활패턴' , div_intro_snore : '코 골 이' , div_intro_snoreY : 'Yes' , div_intro_snoreN : 'No' , div_intro_smoke : '흡 연' , div_intro_smokeY : 'Yes' , div_intro_smokeN : 'No' , div_intro_sleep : '취침 시간' , div_intro_contact : '연락처' , div_intro_self: '자기소개' , div_roomme_info : '룸메이트 정보' , div_roomme_info : '룸메이트의 생활 패턴 및 정보' , div_roomme_snore : '코골이' , div_roomme_smoke : '흡연' , div_roomme_selep : '취침시간' , div_roomme_sfit : '자기소개' , div_roomme_natn : '국적' , appl_notice_title : '공지사항' , appl_notice_subject : '제목' , appl_notice_regdt : '등록일' , appl_notice_regid : '모집일정' , appl_notice_view : '상세보기' }; $.lang.en = { common_title : 'Dorm Enrollment System' , common_home : 'Home' , common_logout : 'Logout' , common_menu_notice : 'Notice' , common_menu_appl : 'Dorm Enrollment' , common_index_title : 'Dorm Enrollment System' , index_login_id : 'ID' , index_login_pw : 'Password' , index_login_btn : 'Login' , index_login_caution : 'Caution' , index_login_caution1 : '※ This program is for current students and freshmen only during the dormitory room application period.' , index_login_caution2 : 'Connection method :ID(Admission number for freshmen) / Password(Same as student portal )' , index_login_caution3 : 'Be sure to close the program after use' , page_tit : 'Dorm Enrollment System' , page_ymst : 'Recruitment Semester' , page_year : 'Year' , page_stnt_id : 'Student ID' , page_stnt_nm : 'Name' , appl_info : 'Application information' , appl_dong : 'application building' , appl_dong2 : 'application building' , appl_type : 'application type' , appl_meal : 'meal division' , appl_2smr : '2nd semester residency' , appl_install : 'installment payment' , room_floor_sel : 'floor selection' , room_floor_all : 'All' , room_please_sel : 'Please select an empty room' , room_app_ing : 'available' , room_app_cmp : 'Application completed' , room_app_close : 'Unable to apply' , div_app_title : 'Would you like to apply for that room?' , div_app_ok : 'Ok' , div_app_cancel : 'Cancel' , div_app_roommate : 'roommate info' , div_intro_title : 'Lifestyle and self-introduction' , div_intro_life : 'life pattern' , div_intro_snore : 'snore' , div_intro_snoreY : 'Yes' , div_intro_snoreN : 'No' , div_intro_smoke : 'smoking' , div_intro_smokeY : 'Yes' , div_intro_smokeN : 'No' , div_intro_sleep : 'bedtime' , div_intro_contact : 'contact' , div_intro_self : 'About Me' , div_roomme_info : 'roommate information' , div_roomme_info : 'Roommate life pattern and information' , div_roomme_snore : 'snore' , div_roomme_smoke : 'smoking' , div_roomme_selep : 'bedtime' , div_roomme_sfit : 'About Me' , div_roomme_natn : 'nationality' , appl_notice_title : 'Notice' , appl_notice_subject : 'title' , appl_notice_regdt : 'registration date' , appl_notice_regid : 'schedule' , appl_notice_dview : 'View Details' , appl_notice_view : 'View' }; /** * setLanguage * use $.lang[currentLanguage][languageNumber] */ function setLanguage(currentLanguage) { $('[data-lang]').each(function() { var $this = $(this); $this.html($.lang[currentLanguage][$this.data('lang')]); if($(this).prop("tagName") == 'INPUT') { $(this).val($.lang[currentLanguage][$this.data('lang')]); } }); setCookie('dormWeb_lang', currentLanguage, 365); } function getLanguage() { var currentLanguage = getCookie('dormWeb_lang'); if (currentLanguage == '' || currentLanguage == null) { if(userLang.substring(0, 2) == 'ko') { currentLanguage = 'ko'; } else { currentLanguage = 'en'; } } return currentLanguage; } function setLabel(knm, enm) { var lang = getCookie('dormWeb_lang'); if(lang == 'en') { return enm; } return knm; }; function setCountLabel(obj, count) { var lang = getCookie('dormWeb_lang'); var txt = ''; if(lang == 'en') { $(obj).text( count + ' result(s) found.'); } else { $(obj).text( '총 ' + count + '건'); } }