fmt标签国际化
来源:互联网 发布:数据融合算法 编辑:程序博客网 时间:2024/06/06 08:11
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<%
String headd=request.getHeader("Accept-Language");
String head=request.getHeader("user-agent");
String local=request.getLocale().getLanguage();
if(local.equals("zh")){
%>
<fmt:setLocale value="zh_CN"/>
<%
}else if(local.equals("en")){
%>
<fmt:setLocale value="en_US"/>
<%
}else{
%>
<fmt:setLocale value="en_US"/>
<%
}
%>
<fmt:setBundle basename="message"/>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.0.2.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> Demo</title>
<script type="text/javascript">
...
</script>
</head>
<body>
<form id="Form" name="Form" method="post">
<table>
<tr>
<td><fmt:message key="username"/></td>
<td><input type="text" name="name" id="username" value=""></td>
</tr>
<tr>
<td><fmt:message key="password"/></td>
<td><input type="text" name="url" id="password" value=""></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" value="ok" onclick="madeAjaxCall();"></td>
</tr>
</table>
</form>
</body>
</html>
资源文件名
message_en_US.properties
message_zh_CN.properties
- fmt标签国际化
- fmt 国际化格式标签库
- fmt 国际化格式标签库
- fmt 国际化格式标签库
- fmt 国际化格式标签库
- 国际化标签 <fmt:bundle>&<fmt:message>的使用
- 国际化标签 <fmt:bundle>&<fmt:message>的使用
- 使用jstl fmt标签实现国际化
- java国际化时使用fmt标签
- java国际化语言----JSTL fmt 标签
- JavaWeb-core剩余标签、国际化、fmt标签、过滤器
- JSTL利用fmt标签国际化的基础实现
- 关于JSTL标签库fmt的资源国际化
- JSTL----国际化标签库 fmt(转自网易)
- fmt 国际化格式标签库(读取application.properties文件)
- fmt标签
- fmt标签
- fmt标签
- 字典和序列的带序号遍历
- 加入到某个线程
- 远程线程植入DLL
- 常见浏览器兼容性问题与解决方案
- WPF布局
- fmt标签国际化
- SQL2005对字符串进行MD5加密
- Jquery 表单验证插件资源整理
- SNMP测试
- HDU 4112 Break the Chocolate(模拟)
- Shell Script For MySQL Enterprise Backup Crontab Schedule
- Oracle 中 将多行列值按照顺序合并成单值输出(connect by)
- 黑马程序员_Java中的接口讲解
- c# 进程间通信