Changes between Version 1 and Version 2 of waue/2010/0805


Ignore:
Timestamp:
Aug 5, 2010, 11:23:02 AM (14 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2010/0805

    v1 v2  
    3838
    3939}}}
     40
     41index.jsp
     42{{{
     43#!java
     44
     45<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
     46import="java.io.*,java.text.*,java.util.*,javax.servlet.jsp.*" %>
     47<%@ taglib uri="http://jakarta.apache.org/taglibs/i18n-1.0" prefix="i18n" %>
     48
     49
     50
     51<HTML>
     52<HEAD>
     53  <TITLE>Examples of I18N Custom Tag Library
     54  Tag Usage</TITLE>
     55</HEAD>
     56<BODY>
     57
     58This page displays all key/value pairs in the bundle.
     59
     60locale = <b><%= pageContext.getResponse().getLocale() %></b><br>
     61charset = <b><%= pageContext.getResponse().getCharacterEncoding() %></b><br>
     62<H2>WebApp translations</H2>
     63<%
     64Locale locale = new Locale("zh","");
     65%>
     66<i18n:bundle baseName="org.mytest.i18n" locale="<%=locale%>" id="bundle"/>
     67<TABLE>
     68 <TR> <TD>1</TD><TD> <i18n:message key="test1"/></TD> </TR>
     69 <TR> <TD>2</TD><TD> <i18n:message key="test2"/></TD> </TR>
     70</TABLE>
     71
     72
     73</BODY>
     74</HTML>
     75}}}
     76
     77