Re: - bis

2005-08-19 Thread Glenn Deschênes
Thanks so much for your reply!!!
I will certainly try your suggestions out.

Greatly appreciated,
Glenn

On 8/18/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> 
> Heh: even more of a hack, provided you're OK keeping with lists rather than
> tables as in your original example:
> 
> 
>
>
>  
>
>
>  
>
>
>  
>#msgs { list-style: none; }
>  
>
> 
> 
> Laurie Harper wrote:
> 
> > I can't think of a way to find out how many messages are queued for
> > display, but you could do something like this (ugly, and untested):
> >
> > 
> > 
> > 
> >   
> > <%-- 2nd or subsequent messsage --%>
> > 
> >   <%-- This is the 2nd message of N; start the list --%>
> >   
> >   
> > 
> > <%-- output previous message --%>
> > 
> > 
> > 
> >   <%-- There was at least one message --%>
> >   
> > <%-- There was only one message; show it --%>
> > 
> >   
> >   
> > <%-- There was more than one message;
> >  output final message and end list. --%>
> > 
> >   
> > 
> >
> > [EMAIL PROTECTED] wrote:
> >
> >> Greetings,
> >>
> >> I have sent this post more almost 2 days ago without one response.
> >> I hope it was simply lost with other posts but still worthy of attention.
> >> Here is the original post:
> >>
> >> I am unable to find a solution... even after searching... and waiting
> >> for the espresso to kick in.
> >>
> >> I have messages and would like to determine the number of messages in
> >> the bean.
> >> If there is more than one message format the output as a list or else
> >> just display the message.
> >> Unable to come up with something.
> >>
> >> This is what I am currently using:
> >> 
> >>
> >>   
> >>   
> >>  
> >>   
> >>   
> >>   
> >>
> >>
> >>   
> >>
> >> 
> >>
> >> Any ideas would be greatly appreciated !
> >> - Glenn
> >
> >
> >
> 
> 
> --
> Laurie Harper
> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> Founder, Zotech Software: http://www.zotechsoftware.com/
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: logic:lessThan problem

2005-08-19 Thread Glenn Deschênes
Hi Peter,

There seems to be a typo in the closing tag.

 Less than 5!


Should be 


- Glenn

On 8/19/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi list!
> 
> I have some problems comparing values with logic tags. I have searched the
> mailing list archive,
> but I only found solutions that look pretty the same as what I have done,
> but it still does not
> work. So perhaps someone can help. I have a bean which stores a list of
> projects. Because
> the size of this list can vary, I get it like this:
> 
> 
> 
> When I write out the size bean , the
> correct size is shown. But when I try to do the following:
> 
> 
> Less than 5!
> 
> 
> Greater or equal 5!
> 
> 
> always both messages are shown! Is there something I am missing?
> 
> Thanks,
> Peter
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I18N by pages

2005-06-24 Thread Glenn Deschênes
Yaroslav,

You just threw in Tiles into the mix !
Can't suggest anything haven't used it yet.
Perhaps you can rephrase exactly what you'd like to do and use.

- Glenn

On 6/24/05, Yaroslav Novytskyy <[EMAIL PROTECTED]> wrote:
> Wow!
> 
> meanwhile I've had the same idea. Posted simultaniosly :)
> 
> But I doubt, that this solution will be compatible with tiles :(
> 
> What do you think about that?
> 
> Best regards
> Yaroslav Novytskyy
> 
> 
> 
> Jeff Beal wrote:
> > Probably your best bet would be to use a custom ActionMapping and
> > override the findForward() method to return a Locale-specific JSP
> > page.
> >
> > On 6/24/05, Yaroslav Novytskyy <[EMAIL PROTECTED]> wrote:
> >
> >>Hi!
> >>
> >>This is exactli what I'd like to avoid and use l10n on pages level not
> >>level of defined strings in message bundles for different languages. I
> >>don't want to use the english (html) design and to translate english
> >>phrases to french, which will be included into english design. I want to
> >>use french _page_. That meens french design with includes french text -
> >>standalone french jsp.
> >>
> >>
> >>Martin Gainty wrote:
> >>
> >>>Glenn et al
> >>>Another option for Struts localisation is to embed your language
> >>>specific strings typically with key="string" defined within your
> >>>ApplicationResources_language_country.Properties file
> >>>struts-config.xml will reference  for key-based tag
> >>>or  (initialisation param) for your servlet for
> >>>ApplicationResources (properties) file
> >>>When these elements are configured properly in struts-config.xml then
> >>>your bean-write will work with 
> >>>Take a look at this excellent tutorial located at
> >>>http://www.systemmobile.com/articles/strutsMessageResources.html#creating-bundle
> >>>
> >>>Bon Chance,
> >>>Martin-
> >>>Etats Unis
> >>>001-617-852-7822
> >>>- Original Message - From: "Glenn Deschênes" <[EMAIL PROTECTED]>
> >>>To: "Struts Users Mailing List" 
> >>>Sent: Friday, June 24, 2005 9:52 AM
> >>>Subject: Re: I18N by pages
> >>>
> >>>
> >>>What you can do is have a jsp for each locale language such as
> >>>page_fr.jsp and page_en.jsp.
> >>>
> >>>Your application can store the locale in the user's session object.
> >>>Your application can update the session locale when the user switches
> >>>between en & fr.
> >>>
> >>>You can have the following forwards for the action in the
> >>>struts-config.xml:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>In your ActionForm you can:
> >>>return mapping.findForward(get the locale language from the session);
> >>>
> >>>HTH,
> >>>Glenn
> >>>
> >>>On 6/24/05, Yaroslav Novytskyy <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>>Hello, all!
> >>>>
> >>>>I just wonder if there is an existing (tested, prooved) way (a kind of
> >>>>development pattern) for Struts to make internationalization not by
> >>>>message resources but by pages (JSPs, templates)?
> >>>>
> >>>>The point is that using message resources deleloper can only define a
> >>>>string value for different locales. For example for "en" welcome=aaa
> >>>>for "fr" welcome=bbb, and you include it like  >>>>"welcome">. This produces "aaa" for "en" and
> >>>>"bbb" for "fr".
> >>>>
> >>>>That makes you limited to localizing only strings, but not the format.
> >>>>E.G. I would like to output "aaa" for "en" and
> >>>>"bbb" for "fr". And this not the matter of defining this
> >>>>strings (bbb) in message bundles, but I would like to use
> >>>>separate JSPs for "en" and "fr" and that is the point. I would like have
> >>>>two jsp files: page1.en.jsp with content of "aaa" and
> >>>>page1.fr.jsp with "bbb". (P.S. this reduces much (maybe even
> >>>>terminates) the mess with m

Re: I18N by pages

2005-06-24 Thread Glenn Deschênes
I'm confused here.

You have 2 resource bundles called:
resource_fr.properties
resource_en.properties

They both have the same keys but different values.

The Struts framework will load the appropriate value from the correct
bundle based on the locale language. That's it !! One jsp can obtain
all of its string values from the bundle.

In your example, you had mentioned that you'd like the title to be
different based on the locale. You can also include the HTML in the
resource file but IMHO this not the most efficient way.

French is usually more verbose than English. At times the HTML page
must be really different to accomodate the French. In general, I
always design the page in French first as for it will work out fine in
English afterwards.

- Glenn
[Martin: très bien !]

On 6/24/05, Yaroslav Novytskyy <[EMAIL PROTECTED]> wrote:
> Hi!
> 
> This is exactli what I'd like to avoid and use l10n on pages level not
> level of defined strings in message bundles for different languages. I
> don't want to use the english (html) design and to translate english
> phrases to french, which will be included into english design. I want to
> use french _page_. That meens french design with includes french text -
> standalone french jsp.
> 
> 
> Martin Gainty wrote:
> > Glenn et al
> > Another option for Struts localisation is to embed your language
> > specific strings typically with key="string" defined within your
> > ApplicationResources_language_country.Properties file
> > struts-config.xml will reference  for key-based tag
> > or  (initialisation param) for your servlet for
> > ApplicationResources (properties) file
> > When these elements are configured properly in struts-config.xml then
> > your bean-write will work with 
> > Take a look at this excellent tutorial located at
> > http://www.systemmobile.com/articles/strutsMessageResources.html#creating-bundle
> >
> > Bon Chance,
> > Martin-
> > Etats Unis
> > 001-617-852-7822
> > - Original Message - From: "Glenn Deschênes" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Friday, June 24, 2005 9:52 AM
> > Subject: Re: I18N by pages
> >
> >
> > What you can do is have a jsp for each locale language such as
> > page_fr.jsp and page_en.jsp.
> >
> > Your application can store the locale in the user's session object.
> > Your application can update the session locale when the user switches
> > between en & fr.
> >
> > You can have the following forwards for the action in the
> > struts-config.xml:
> > 
> > 
> > 
> > 
> >
> > In your ActionForm you can:
> > return mapping.findForward(get the locale language from the session);
> >
> > HTH,
> > Glenn
> >
> > On 6/24/05, Yaroslav Novytskyy <[EMAIL PROTECTED]> wrote:
> >
> >> Hello, all!
> >>
> >> I just wonder if there is an existing (tested, prooved) way (a kind of
> >> development pattern) for Struts to make internationalization not by
> >> message resources but by pages (JSPs, templates)?
> >>
> >> The point is that using message resources deleloper can only define a
> >> string value for different locales. For example for "en" welcome=aaa
> >> for "fr" welcome=bbb, and you include it like  >> "welcome">. This produces "aaa" for "en" and
> >> "bbb" for "fr".
> >>
> >> That makes you limited to localizing only strings, but not the format.
> >> E.G. I would like to output "aaa" for "en" and
> >> "bbb" for "fr". And this not the matter of defining this
> >> strings (bbb) in message bundles, but I would like to use
> >> separate JSPs for "en" and "fr" and that is the point. I would like have
> >> two jsp files: page1.en.jsp with content of "aaa" and
> >> page1.fr.jsp with "bbb". (P.S. this reduces much (maybe even
> >> terminates) the mess with message bundles).
> >>
> >>
> >> Please write all your suggestions and thoughts.
> >>
> >> Best regards
> >> Yaroslav Novytskyy
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I18N by pages

2005-06-24 Thread Glenn Deschênes
What you can do is have a jsp for each locale language such as
page_fr.jsp and page_en.jsp.

Your application can store the locale in the user's session object.
Your application can update the session locale when the user switches
between en & fr.

You can have the following forwards for the action in the struts-config.xml:





In your ActionForm you can:
return mapping.findForward(get the locale language from the session);

HTH,
Glenn

On 6/24/05, Yaroslav Novytskyy <[EMAIL PROTECTED]> wrote:
> Hello, all!
> 
> I just wonder if there is an existing (tested, prooved) way (a kind of
> development pattern) for Struts to make internationalization not by
> message resources but by pages (JSPs, templates)?
> 
> The point is that using message resources deleloper can only define a
> string value for different locales. For example for "en" welcome=aaa
> for "fr" welcome=bbb, and you include it like  "welcome">. This produces "aaa" for "en" and
> "bbb" for "fr".
> 
> That makes you limited to localizing only strings, but not the format.
> E.G. I would like to output "aaa" for "en" and
> "bbb" for "fr". And this not the matter of defining this
> strings (bbb) in message bundles, but I would like to use
> separate JSPs for "en" and "fr" and that is the point. I would like have
> two jsp files: page1.en.jsp with content of "aaa" and
> page1.fr.jsp with "bbb". (P.S. this reduces much (maybe even
> terminates) the mess with message bundles).
> 
> 
> Please write all your suggestions and thoughts.
> 
> Best regards
> Yaroslav Novytskyy
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]