상세 컨텐츠

본문 제목

자바 설정언어에 따라 버튼이랑 타이틀 언어 바뀌게 하기

관리X 과거글

by 까먹기전에 2015. 3. 19. 12:27

본문

반응형

=======================시작화면============================

<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>

<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<fmt:setLocale value="${param.lo}" /> 

<fmt:setBundle var="bundle1" basename="a.b.member" />

<fmt:setBundle var="bundle2" basename="a.b.emp" /> 

<!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=EUC-KR">

<title>Insert title here</title>

</head>

<body>

<fmt:message bundle="${bundle1}" key="TITLE"/><br>

<button><fmt:message bundle="${bundle1}" key="ADDBUTTON"/></button>

<button><fmt:message bundle="${bundle1}" key="REMOVEBUTTON"/></button>

<br>

<fmt:message bundle="${bundle2}" key="TITLE"/><br>

<button><fmt:message bundle="${bundle2}" key="ADDBUTTON"/></button>

<button><fmt:message bundle="${bundle2}" key="REMOVEBUTTON"/></button>

</body>

</html>

========================이엠피 프로퍼티===============================

TITLE = \uC9C1\uC6D0\uB9AC\uC2A4\uD2B8

ADDBUTTON = \uCD94\uAC00

REMOVEBUTTON = \uC0AD\uC81C

=============================================

TITLE=Emp List

ADDBUTTON=Emp Add

REMOVEBUTTON=Emp Remove

======================이건 멤버 프로퍼티=========================

TITLE = \uD68C\uC6D0\uB9AC\uC2A4\uD2B8

ADDBUTTON=\uCD94\uAC00

REMOVEBUTTON=\uC0AD\uC81C

===============================================

TITLE = MEMBER LIST

ADDBUTTON=MEMBER ADD

REMOVEBUTTON=MEMBER REMOVE





관련글 더보기