Copy
// 캡챠 HTML 코드 출력function captcha_html($class="captcha"){ if(is_mobile()) $class .= ' m_captcha'; $html .= "\n".'<script>var g5_captcha_url = "'.G5_CAPTCHA_URL.'";</script>'; //$html .= "\n".'<script>var g5_captcha_path = "'.G5_CAPTCHA_PATH.'";</script>'; $html .= "\n".'<script src="'.G5_CAPTCHA_URL.'/kcaptcha.js"></script>'; $html .= "\n".'<fieldset id="captcha" class="'.$class.'">'; $html .= "\n".'<legend><label for="captcha_key">자동등록방지</label></legend>'; if (is_mobile()) $html .= '<audio src="#" id="captcha_audio" controls></audio>'; //$html .= "\n".'<img src="#" alt="" id="captcha_img">'; $html .= "\n".'<img src="javascript:void(0);" alt="" id="captcha_img">'; if (!is_mobile()) $html .= "\n".'<button type="button" id="captcha_mp3"><span></span>숫자음성듣기</button>'; $html .= "\n".'<button type="button" id="captcha_reload"><span></span>새로고침</button>'; $html .= '<input type="text" name="captcha_key" id="captcha_key" class="captcha_box required" size="6" maxlength="6">'; $html .= "\n".'<span id="captcha_info">자동등록방지 숫자를 순서대로 입력하세요.</span>'; // 번역 추가 한국if($lang =="kr") { $html .= "\n".'<span id="captcha_info">한글.</span>';}// 번역 추가 영문 if($lang =="en"){ $html .= "\n".'<span id="captcha_info">eng.</span>';} $html .= "\n".'</fieldset>'; return $html;}
자동등록방지 숫자를 순서대로 입력하세요. 이 문구를
한국어를 눌렀을때 한국어로 나오고
영문으로 들어갔을대 영문으로 나오게 하고싶습니다.
php 구문은 맞게 적용한것같은데
// 번역 추가 한국
if($lang =="kr") {
$html .= "\n".'<span id="captcha_info">한글.</span>';
}
// 번역 추가 영문
if($lang =="en"){
$html .= "\n".'<span id="captcha_info">eng.</span>';
}
추가를 해보고 보니 내용이 나오지 않습니다. 혹시 오류가 있는지 체크부탁드립니다 ^^;
답변 1개 / 댓글 1개
채택된 답변
+20 포인트
2017-06-07 (수) 16:48:07
global $lang;
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.