"Java EE Enterprise Application Combat Learning record" struts internationalization

Source: Internet
Author: User
Tags i18n

1<%--2 Created by IntelliJ.3 User:administrator4Date:2016/10/65Time:16:266To change ThisTemplate Use File | Settings |File Templates.7--%>8<%@ page contenttype= "Text/html;charset=utf-8" language= "java"%>9<% @taglib prefix= "s" uri= "/struts-tags"%>Ten One A<title><s:text name= "LoginPage"/>></title> - -<body> the<s:form action= "Login" > -<s:textfield name= "username" key= "user"/> -<s:textfield name= "password" key= "pass"/> -<s:submit key= "Login"/> +</s:form> -</body> +
1<?xml version= "1.0" encoding= "UTF-8"?>2<!--struts.xml configuration file--3<!DOCTYPE Struts public4"-//apache software foundation//dtd Struts Configuration 2.3//en"5"Http://struts.apache.org/dtds/struts-2.3.dtd" >6<!--Specify the root element of the STRUTS2 configuration file--7<struts>8<!--Specify global internationalized resource Files--9<constant name= "struts.custom.i18n.resources" value= "mess"/>Ten<!--Specify the character set used for internationalized encoding-- One<constant name= "struts.i18n.encoding" value= "Utf-8"/> A</struts>

Base is named mess so we're going to provide a mess.properties and messa_zh_cn.properties file.

loginpage= Login page errorpage= error page Succpage= Success page Failtip= Sorry, you cannot log in succtip= Welcome, {0 you have logged inuser = Username Pass= passwordlogin = Login
1Loginpage=\u767b\u9646\u9875\u97622Errorpage=\u9519\u8bef\u9875\u97623Succpage=\u6210\u529f\u9875\u97624failtip=\u5bf9\u4e0d\u8d77\uff0c\u60a8\u4e0d\u80fd\u767b\u5f55\uff015Succtip=\u6b22\u8fce\uff0c{0},\u60a8\u5df2\u7ecf\u767b\u5f55\uff016User=\u7528\u6237\u540d7pass=\u5bc6 \u78018login=\u767b\u96469User.required=\u7528\u6237\u540d\u5fc5\u987b\u8f93\u5165\uff01TenPass.required=\u5bc6\u7801\u5fc5\u987b\u8f93\u5165\uff01

"Java EE Enterprise Application Combat Learning record" struts internationalization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.