Re: Internationalization of menu items using Struts-menu with struts 2

max max <[email protected]> Tue, 12 Jul 2011 18:34:05 +0100 (BST)
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <[email protected]>
if you want more precision about my code  i put you more :)

--- En date de=A0: Mar 12.7.11, max max <[email protected]> a =E9crit=A0:

> De: max max <[email protected]>
> Objet: Re: [struts-menu] Internationalization of menu items using Struts-=
menu with struts 2
> =C0: "General mailing list for Struts Menu" <[email protected]=
eforge.net>
> Date: Mardi 12 juillet 2011, 19h18
> hi =

> i want to change langage but i cannot do that i try to put
> the =

> <context-param>
> =A0 =A0 =A0 =A0
> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> =A0 =A0 =A0 =A0
> <param-value>Global</param-value>
> =A0 =A0 </context-param>
> on my Web.xml its not working too.
> --- En date de=A0: Mar 12.7.11, Matt Raible <matt-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]>
> a =E9crit=A0:
> =

> > De: Matt Raible <matt-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]>
> > Objet: Re: [struts-menu] Internationalization of menu
> items using Struts-menu with struts 2
> > =C0: "General mailing list for Struts Menu" <[email protected]=
rceforge.net>
> > Date: Mardi 12 juillet 2011, 18h50
> > What are you using to try and switch
> > the locale? Are you able to switch the locale for the
> rest
> > of your messages?
> > =

> > On Jul 12, 2011, at 10:46 AM, yvan khekhone wrote:
> > =

> > > =

> > > hi =

> > > i have the same configuration with struts2 and
> Struts
> > menu i cannot switch
> > > language.
> > > i show my code =

> > > =

> > > on my struts menu
> > > =

> > > <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> > > <MenuConfig>
> > >=A0 =A0 <Displayers>
> > > =

> > > =

> > > <Displayer name=3D"TabbedMenu"
> > >=A0
> >
> type=3D"net.sf.navigator.displayer.TabbedMenuDisplayer"/>
> > >=A0 =A0=A0=A0</Displayers>
> > > <Menus> =

> > > <Menu name=3D"Global.Home" title=3D"Home"=A0
> > page=3D"totoAction.action"=A0 /> =

> > >=A0 <Menu name=3D"Global.About" title=3D"About"=A0
> > page=3D"modification.action" />
> > >=A0 <Menu name=3D"Global.About"
> > title=3D"animaux"=A0 page=3D"animal.action" />
> > >=A0 </Menus>
> > > =

> > > </MenuConfig>
> > > =

> > > on my jsp page.
> > > =

> > > <%@ page language=3D"java"
> contentType=3D"text/html;
> > charset=3DISO-8859-1"
> > >=A0 =A0 pageEncoding=3D"ISO-8859-1"%>
> > >=A0 =A0=A0=A0<%@ taglib prefix=3D"s"
> > uri=3D"/struts-tags" %>
> > >=A0 =A0=A0=A0<%@ taglib prefix=3D"sx"
> > uri=3D"/struts-dojo-tags" %>
> > >=A0 =A0=A0=A0<%@ taglib prefix=3D"menu"
> > uri=3D"http://struts-menu.sf.net/tag-el"%>
> > > =

> > > <html>
> > >=A0 <head>
> > > =

> > >=A0 </head>
> > >=A0 <body>
> > > =

> > >=A0 =A0 <h1 class=3D'title'>SiteMesh example
> > site: <sitemesh:write
> > > property=3D'title'/></h1>
> > > <div>
> > > <div id=3D"menu" class=3D"menu">
> > > <menu:useMenuDisplayer name=3D"TabbedMenu"
> > >=A0 bundle=3D"Global" >
> > >=A0 <menu:displayMenu name=3D"Global.Home" />
> > >=A0 <menu:displayMenu name=3D"Global.About" />
> > > </menu:useMenuDisplayer>
> > > </div>
> > >=A0 =A0 <div class=3D'mainBody'>
> > >=A0 =A0 =A0 <sitemesh:write
> > property=3D'body'/>
> > >=A0 =A0 </div>
> > > </div>
> > >=A0 =A0 <div class=3D'disclaimer'>Site
> > disclaimer. This is an example.</div>
> > > =

> > >=A0 </body>
> > > </html>
> > > i put attribut but its not working too :/
> > > =

> > > =

> > > mraible wrote:
> > >> =

> > >> Struts Menu uses JSTL in the "el" version to
> > resolve messages.
> > >> =

> > >> On Feb 16, 2011, at 12:26 PM, Tiago Farias
> wrote:
> > >> =

> > >>> So rude. Sorry I forgot to thank you for
> > saving me! Thank you very much!
> > >>> =3DD
> > >>> =

> > >>> On Wed, Feb 16, 2011 at 4:25 PM, Tiago
> Farias
> > <[email protected]>
> > wrote:
> > >>> Yup! You're absolutely right. Now I'm
> just
> > curious. How does that work
> > >>> Matt?
> > >>> =

> > >>> =

> > >>> On Wed, Feb 16, 2011 at 1:40 PM, Matt
> Raible
> > <matt-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]>
> > >>> wrote:
> > >>> If you remove the bundle attribute and
> add the
> > following to your web.xml,
> > >>> it should work. The param name is the
> name of
> > your properties file in
> > >>> WEB-INF/classes, without the .properties
> > extension.
> > >>> =

> > >>>=A0 =A0 <!-- Define the basename for a
> > resource bundle for I18N -->
> > >>>=A0 =A0 <context-param>
> > >>> =

> > >>>
> >
> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> > >>>=A0 =A0 =A0 =A0
> >
> <param-value>ApplicationResources</param-value>
> > >>>=A0 =A0 </context-param>
> > >>> =

> > >>> =

> > >>> On Feb 16, 2011, at 9:27 AM, Tiago
> Farias
> > wrote:
> > >>> =

> > >>>> Hello, I'm trying to make a custom
> menu
> > for a web app and it all worked
> > >>>> just fine, but now I need to
> > internationalize it using a properties
> > >>>> file. This properties file already
> exists
> > and the whole app uses it. My
> > >>>> menu-config.xml is this: =

> > >>>> =

> > >>>>=A0=A0=A0<Displayers>
> > >>>>=A0 =A0 =A0
> > =A0=A0=A0<Displayer name=3D"Velocity"
> > >>>>
> >
> type=3D"net.sf.navigator.displayer.VelocityMenuDisplayer"/>
> > >>>>=A0 =A0 </Displayers>
> > >>>> =

> > >>>>=A0 =A0 <Menus>
> > >>>>=A0 =A0 =A0 =A0 <!--=A0
> > <Menu name=3D"ecfMenu" title=3D"ECFs"
> > location=3D"?Contact">
> > >>>>=A0 =A0 =A0 =A0 =A0 <Item
> > name=3D"email" title=3D"E-Mail" location=3D"?EMail"/>
> > >>>>=A0 =A0 =A0 =A0 =A0 <Item
> > name=3D"phone" title=3D"Phone" location=3D"?Phone"/>
> > >>>>=A0 =A0 =A0 =A0
> > </Menu>-->
> > >>>> =

> > >>>>=A0 =A0 =A0 =A0 <Menu
> > name=3D"mainMenu" title=3D"" >
> > >>>>=A0 =A0 =A0 =A0 =A0 <Item
> > name=3D"ecfMenu" title=3D"ECFs" roles=3D"FISCO"
> > >>>> location=3D"DisconnectedEcfsSearch"
> />
> > >>>>=A0 =A0 =A0 =A0 =A0 <Item
> > name=3D"reportsMenu" title=3D"Relat=F3rios" roles=3D"ADMIN"
> > >>>> location=3D"AlarmReportSearch"/>
> > >>>>=A0 =A0 =A0 =A0 =A0 <Item
> > name=3D"fiscoMenu" title=3D"Fisco" roles=3D"ADMIN"
> > >>>> location=3D"UpdateFiscoForm"/>
> > >>>>=A0 =A0 =A0 =A0 =A0 <Item
> > name=3D"alarmMenu" title=3D"Alarmes" roles=3D"ADMIN"
> > >>>> location=3D"AlarmNotification"/>
> > >>>>=A0 =A0 =A0 =A0 =A0 <Item
> > name=3D"userMenu" title=3D"application.header.users"
> > >>>> roles=3D"ADMIN"
> location=3D"UserSearch"/>
> > >>>>=A0 =A0 =A0 =A0 =A0 <Item
> > name=3D"consoleMenu" title=3D"Console" roles=3D"FISCO"
> > >>>> location=3D"ConsoleSearch"/>
> > >>>>=A0 =A0 =A0 =A0 </Menu>
> > >>>> =

> > >>>> And my jsp file is this:
> > >>>> <%@taglib uri=3D"http://struts-menu.sf.net/tag-el" prefix=3D"menu"=
 %>
> > >>>> =

> > >>>>=A0 =A0 =A0 =A0
> > =A0=A0=A0<menu:useMenuDisplayer
> > permissions=3D"rolesAdapter"
> > >>>> name=3D"Velocity"
> > config=3D"/WEB-INF/tabs.html"
> > >>>>=A0 =A0 =A0 =A0 =A0 =A0
> > =A0 =A0 bundle=3D"org.apache.struts.action.MESSAGE">
> > >>>>=A0 =A0 =A0 =A0 =A0 =A0
> > =A0 =A0 <menu:displayMenu name=3D"mainMenu"/>
> > >>>>=A0 =A0 =A0 =A0 =A0 =A0
> > </menu:useMenuDisplayer>
> > >>>> =

> > >>>> The thing is that all the menu titles
> are
> > ok except for the "userMenu"
> > >>>> title that is displaying the key to
> the
> > properties file
> > >>>> (application.header.users). I wanted
> it to
> > get the i18n file and display
> > >>>> the value associated with this key.
> I'm
> > using struts2 and all the
> > >>>> tutorials I found for this are
> Struts1's.
> > Need help! Don't know what
> > >>>> else to do...
> > >>>> =

> > >>>> Best regards!
> > >>>>
> >
> -------------------------------------------------------------------------=
-----
> > >>>> The ultimate all-in-one performance
> > toolkit: Intel(R) Parallel Studio
> > >>>> XE:
> > >>>> Pinpoint memory and threading errors
> > before they happen.
> > >>>> Find and fix more than 250 security
> > defects in the development cycle.
> > >>>> Locate bottlenecks in serial and
> parallel
> > code that limit performance.
> > >>>> http://p.sf.net/sfu/intel-dev2devfeb______________________________=
_________________
> > >>>> struts-menu-user mailing list
> > >>>> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > >>>> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
> > >>> =

> > >>> =

> > >>>
> >
> -------------------------------------------------------------------------=
-----
> > >>> The ultimate all-in-one performance
> toolkit:
> > Intel(R) Parallel Studio XE:
> > >>> Pinpoint memory and threading errors
> before
> > they happen.
> > >>> Find and fix more than 250 security
> defects in
> > the development cycle.
> > >>> Locate bottlenecks in serial and parallel
> code
> > that limit performance.
> > >>> http://p.sf.net/sfu/intel-dev2devfeb
> > >>>
> > _______________________________________________
> > >>> struts-menu-user mailing list
> > >>> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > >>> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
> > >>> =

> > >>> =

> > >>> =

> > >>>
> >
> -------------------------------------------------------------------------=
-----
> > >>> The ultimate all-in-one performance
> toolkit:
> > Intel(R) Parallel Studio XE:
> > >>> Pinpoint memory and threading errors
> before
> > they happen.
> > >>> Find and fix more than 250 security
> defects in
> > the development cycle.
> > >>> Locate bottlenecks in serial and parallel
> code
> > that limit performance.
> > >>> http://p.sf.net/sfu/intel-dev2devfeb_______________________________=
________________
> > >>> struts-menu-user mailing list
> > >>> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > >>> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
> > >> =

> > >> =

> > >>
> >
> -------------------------------------------------------------------------=
-----
> > >> The ultimate all-in-one performance toolkit:
> > Intel(R) Parallel Studio XE:
> > >> Pinpoint memory and threading errors before
> they
> > happen.
> > >> Find and fix more than 250 security defects
> in the
> > development cycle.
> > >> Locate bottlenecks in serial and parallel
> code
> > that limit performance.
> > >> http://p.sf.net/sfu/intel-dev2devfeb
> > >>
> _______________________________________________
> > >> struts-menu-user mailing list
> > >> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > >> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
> > >> =

> > >> =

> > > =

> > > -- =

> > > View this message in context: http://old.nabble.com/Internationalizat=
ion-of-menu-items-using-Struts-menu-with-struts-2-tp30942065p32047366.html
> > > Sent from the struts-menu-user mailing list
> archive at
> > Nabble.com.
> > > =

> > > =

> > >
> >
> -------------------------------------------------------------------------=
-----
> > > AppSumo Presents a FREE Video for the
> SourceForge
> > Community by Eric =

> > > Ries, the creator of the Lean Startup Methodology
> on
> > "Lean Startup =

> > > Secrets Revealed." This video shows you how to
> > validate your ideas, =

> > > optimize your ideas and identify your business
> > strategy.
> > > http://p.sf.net/sfu/appsumosfdev2dev
> > > _______________________________________________
> > > struts-menu-user mailing list
> > > struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > https://lists.sourceforge.net/lists/listinfo/struts-menu-user
> > =

> > =

> >
> -------------------------------------------------------------------------=
-----
> > AppSumo Presents a FREE Video for the SourceForge
> Community
> > by Eric =

> > Ries, the creator of the Lean Startup Methodology on
> "Lean
> > Startup =

> > Secrets Revealed." This video shows you how to
> validate
> > your ideas, =

> > optimize your ideas and identify your business
> strategy.
> > http://p.sf.net/sfu/appsumosfdev2dev
> > _______________________________________________
> > struts-menu-user mailing list
> > struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > https://lists.sourceforge.net/lists/listinfo/struts-menu-user
> > =

> =

> -------------------------------------------------------------------------=
-----
> AppSumo Presents a FREE Video for the SourceForge Community
> by Eric =

> Ries, the creator of the Lean Startup Methodology on "Lean
> Startup =

> Secrets Revealed." This video shows you how to validate
> your ideas, =

> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> struts-menu-user mailing list
> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
> =


---------------------------------------------------------------------------=
---
AppSumo Presents a FREE Video for the SourceForge Community by Eric =

Ries, the creator of the Lean Startup Methodology on "Lean Startup =

Secrets Revealed." This video shows you how to validate your ideas, =

optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev