You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Yunfeng Hou <ho...@yahoo.com> on 2002/01/14 19:38:15 UTC

Re: i18n Forwards

I am really glad to see this this topic, and would
like to share some of my thoughts, which I made
modification to struts to make the site work for both
Chinese and English.
1. Input is also treat as one form of forwards, so it
can be defined as attribute of action, or  forward of
the action.
2. in struts-config.xml, forwards can be defined as
follows
<action path="..." input="input.jsp" >
<forward name="success" path="success.jsp"/>
<forward name="success_zh_CN"
path="success_zh_CN.jsp"/> or <forward
name="success_zh_CN" path="zh/success.jsp"/> 
<forward name="input_zh_CN" path="input_zh_CN.jsp"/>
or <forward name="input_zh_CN" path="zh/input.jsp"/>
3. add methods in ActionMapping: 
findForward(name, request), it will use locale in
request to find name+"_"+locale first, if not found,
will return findForward(name);
getInput(request), where it will first call
findForward("input",request), if nothing found, will
return getInput();
4. Modify ActionServlet to call getInput(request)
instead of getInput()



_________________________________________________________
Do You Yahoo!? 登录免费雅虎电邮! http://mail.yahoo.com.cn

<font color=#6666FF>无聊?郁闷?高兴?没理由?都来聊天吧!</font>―― 
雅虎全新聊天室! http://cn.chat.yahoo.com/c/roomlist.html

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>