uauction 메세지 파일 번역하기위한 jsp파일
2017.05.30 17:51
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="java.util.*"%>
<%@page import="java.io.FileReader"%>
<%@page import="java.io.IOException"%>
<%@page import="java.net.URLEncoder" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div id="google_translate_element"></div>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<%
try {
BufferedReader in = new BufferedReader(new FileReader("C:/tmp/conv/EN/messages.inc.php"));
BufferedReader in2 = new BufferedReader(new FileReader("C:/tmp/conv/KR/messages.inc.php"));
String s;
Map<String, String> map = new HashMap<String, String>();
Map<String, String> map2 = new HashMap<String, String>();
while ((s = in.readLine()) != null) {
if(s.startsWith("$")) {
String[] split_in = s.split("=");
map.put(split_in[0], split_in[1]);
} else {
// pass
}
}
in.close();
s = null;
while ((s = in2.readLine()) != null) {
if(s.startsWith("$")) {
String[] split_in = s.split("=");
map2.put(split_in[0], split_in[1]);
} else {
// pass
}
}
in2.close();
Iterator<String> keys = map.keySet().iterator();
/* */
while (keys.hasNext()) {
String key = keys.next();
out.print("<table><tr>");
//out.print("<td><input type=text name =aaa value="+key+"</input></td>");
out.print("<td>"+key+""="</td>");
out.print("<td><textarea name =bbb cols=50 rows=5 style="display:none;">"+map.get(key)+"</textarea></td>");
// 번역기용
out.print("<td width=600><p>"+map.get(key)+"</p></td>");
/*
if(map2.containsKey(key)) {
out.print("<td><textarea name =ccc cols=50 rows=5>"+map2.get(key)+"</textarea></td>");
} else {
out.print("<td><textarea name =ccc cols=50 rows=5>"+""+"</textarea></td>");
}
*/
out.print("</tr></table>");
}
/* */
////////////////////////////////////////////////////////////////
} catch (IOException e) {
System.err.println(e); // 에러가 있다면 메시지 출력
System.exit(1);
}
%>
<p>This example displays a simple translate button, with no text.</p>
<p>park</p>
<p>sang</p>
</body>
</html>
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 33 |
test note images
| 총관리자 | 2017.04.06 | 47 |
| 32 | 메세지 파일 | 총관리자 | 2017.05.30 | 121525 |
| » | uauction 메세지 파일 번역하기위한 jsp파일 | 총관리자 | 2017.05.30 | 7061 |
| 30 |
그립에서 얘기하는 리소스 구조
| 총관리자 | 2017.06.07 | 47 |
| 29 |
Authorization With Apache Sentry
| 총관리자 | 2018.03.05 | 11 |
| 28 |
Sentry 설치하기
| 총관리자 | 2018.03.05 | 15 |
| 27 | 2014년 까지의 동전 발행량 | 총관리자 | 2018.11.18 | 23 |
| 26 | ssd문의 | 총관리자 | 2019.05.27 | 5 |
| 25 | Docker+Kubernetes를 이용한 빌드 서버 가상화 사례 SK플래닛@tech세미나 | 총관리자 | 2019.06.07 | 5147 |
| 24 | 약관 | 총관리자 | 2021.12.31 | 215 |
| 23 | https://docs.cloudera.com/cdp-private-cloud-base/7.1.6/security-overview/topics/cm-security-authentication-overview.html | gooper | 2022.06.07 | 1327 |
| 22 | cot 챠트 | gooper | 2022.06.10 | 422 |
| 21 | 개인사업자 부가세신고 방법 종결 포스팅 - 국세청 홈택스 셀프 신고 | gooper | 2022.07.14 | 16 |
| 20 | 종로골드및 골드테크 정보 | gooper | 2022.08.19 | 147 |
| 19 | gold 미결제 뫅인 | gooper | 2022.12.05 | 10 |
| 18 | silver 미결제 확인 | gooper | 2022.12.05 | 110 |
| 17 | 미국주식 공매도 현황 | gooper | 2024.03.01 | 155 |
| 16 | 한국인 해외주식 보유헌황 | gooper | 2024.03.05 | 22 |
| 15 | 제로보드 XE, 워드프레스로 이전 참고 사이트 | gooper | 2024.04.09 | 14 |
| 14 | 질문 | gooper | 2024.07.12 | 12 |