bundle_standard.jsp

来自「jakarta-taglibs」· JSP 代码 · 共 36 行

JSP
36
字号
<%@ taglib uri="http://jakarta.apache.org/taglibs/i18n-1.0" prefix="i18n" %>
<%@ page contentType="text/html; charset=utf-8" %>
<i18n:bundle baseName="org.apache.taglibs.i18n.i18n-test"
             localeRef="userLocale"
             scope="request"
             changeResponseLocale="true"/>

<HTML>
<HEAD>
  <TITLE>Examples of I18N Custom Tag Library Tag Usage</TITLE>
</HEAD>
<BODY>

The <b>i18n</b> tag library contains tags to support internationalization and
localization.<p>

The <i>bundle</i> tag provides no HTML output; it simply sets the bundle used
by the rest of the i18n tags on the page.  A baseName must be provided, and a
locale is optional.<p>

For this page, the locale has been provided as a runtime expression value that
happens to be hardcoded to Locale.US. Any object could have been provided,
for example, a database lookup could have been used.<p>

<hr>
<%@ include file="message.jsf" %>
<hr>
<%@ include file="ifdef.jsf" %>
<hr>
<%@ include file="ifndef.jsf" %>
<hr>
Response encoding = <%= response.getCharacterEncoding() %><br>
Response locale   = <%= response.getLocale() %>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?