You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "CRANFORD, CHRIS" <Ch...@setech.com> on 2010/03/05 23:08:02 UTC

Struts-Menu & Struts2

Besides specifying the bundle attribute on the menu:useDisplayer tag, is
there any other way to translate the text from menu-config.xml with
struts2?  If I specify the bundle as "applicationMessages", it works but
always translates to English rather than the other languages such as
german.  How can get it to work with struts2?



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts-Menu & Struts2

Posted by stanilas <st...@yahoo.fr>.
hi people 
i try your method but its not working when i put the tag local
i put my jsp :
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ taglib prefix="s" uri="/struts-tags" %>
     <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
     <%@ taglib prefix="menu" uri="http://struts-menu.sf.net/tag-el"%>

<div id="menu" class="menu">
<menu:useMenuDisplayer name="TabbedMenu"
  bundle="Global" locale="WW_TRANS_i18N_LOCALE">
  <menu:displayMenu name="Global.Home" />
  <menu:displayMenu name="Global.About" />
</menu:useMenuDisplayer>
</div>


my strutsmenu.xml

<?xml version="1.0" encoding="UTF-8"?>
<MenuConfig>
    <Displayers>
        <Displayer name="Velocity"
type="net.sf.navigator.displayer.VelocityMenuDisplayer"/>
    
  <Displayer name="TabbedMenu"
  type="net.sf.navigator.displayer.TabbedMenuDisplayer"/></Displayers>
<Menus > 
 
  
  <Menu name="Global.Home" title="Home"  page="totoAction.action"    /> 
  <Menu name="Global.About" title="About" page="modification.action" 
/></Menus>

</MenuConfig>

my web.xml:
  <filter>
        <filter-name>struts2</filter-name>
       
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
 
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <listener>
       
<listener-class>net.sf.navigator.menu.MenuContextListener</listener-class>
    </listener>
    



--
View this message in context: http://struts.1045723.n5.nabble.com/Struts-Menu-Struts2-tp3497566p4560788.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts-Menu & Struts2

Posted by stanilas <st...@yahoo.fr>.
hi
when put locale"WW_TRANS_I18N_LOCALE" its not working anymore :/
maybe i have to put default attibut like FR?

--
View this message in context: http://struts.1045723.n5.nabble.com/Struts-Menu-Struts2-tp3497566p4560377.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts-Menu & Struts2

Posted by "CRANFORD, CHRIS" <Ch...@setech.com>.
Looks like I have to specify two attributes on the tag:

  bundle="applicationMessages"
  locale="WW_TRANS_I18N_LOCALE"

By doing this allows struts-menu to work with the Struts2
internationalization support.  

Chris

> -----Original Message-----
> From: CRANFORD, CHRIS [mailto:Chris.Cranford@setech.com]
> Sent: Friday, March 05, 2010 4:08 PM
> To: Struts Users Mailing List
> Subject: Struts-Menu & Struts2
> 
> Besides specifying the bundle attribute on the menu:useDisplayer tag,
is
> there any other way to translate the text from menu-config.xml with
> struts2?  If I specify the bundle as "applicationMessages", it works
but
> always translates to English rather than the other languages such as
> german.  How can get it to work with struts2?


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org