Re: Struts, Tiles and Internationalization

2005-10-10 Thread Bryon Lape
The current site allows the user to select their language.  Plus, I am
adding registration so there a user needs to be allowed to select their
default language for when they return and log in.  Right now we are simply
adding Canadian English and French.  It is easy enough to see that a
coffee house in Quebec may have all their browsers set for French, but
there may be an English wanting visitor.  I am lobbying for choosing the
language based on the browser and let the user override as needed.  The
real kicker is I need to be able to run web log reports and divide visits
by each of the three languages.

> Hi!
>
> I thing you don't have to put the language-oriented tags. Just do the
> normal Struts-Internationalization with applicaition_resources, this
> technique is independent of using tiles or not and works great.
>
> Choosing language manually  is another issue. It will work anyway by
> Struts reading the browser default settings, but language-swich buttons
> are a little bit more tricky. Ask if you need it.
>
> Greetz
>
> Danny
>
>
>
> Bryon Lape schrieb:
>> A customer of ours has a site that they want to move into Canada.  This
>> means every page will need to be translated into Canadan French and
>> abide
>> by Canadian law.  Currently, the site is en_US.  THe site was built
>> using
>> Struts and Tiles, but the tiles are not defined in Tiles XML, instead
>> there are a few template JSP using  in the template to
>> name zones and the pages which use each template use  to
>> load the template and  to give a value for each named zone.
>> I am seeking pointers on how best to change this to allow for language.
>>
>> Do I need to put each page as a defintion in the tiles XML?  If the
>> inserts are made not to be direct put instead include file fragments,
>> how
>> do I then choose a language?  This site currently has about 40 browsable
>> pages.
>>
>> Thanks in advance.
>>
>> Bryon
>
>
> -
> 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: Struts, Tiles and Internationalization

2005-10-08 Thread Danny Lee

Hi!

I thing you don't have to put the language-oriented tags. Just do the 
normal Struts-Internationalization with applicaition_resources, this 
technique is independent of using tiles or not and works great.


Choosing language manually  is another issue. It will work anyway by 
Struts reading the browser default settings, but language-swich buttons 
are a little bit more tricky. Ask if you need it.


Greetz

Danny



Bryon Lape schrieb:

A customer of ours has a site that they want to move into Canada.  This
means every page will need to be translated into Canadan French and abide
by Canadian law.  Currently, the site is en_US.  THe site was built using
Struts and Tiles, but the tiles are not defined in Tiles XML, instead
there are a few template JSP using  in the template to
name zones and the pages which use each template use  to
load the template and  to give a value for each named zone. 
I am seeking pointers on how best to change this to allow for language.


Do I need to put each page as a defintion in the tiles XML?  If the
inserts are made not to be direct put instead include file fragments, how
do I then choose a language?  This site currently has about 40 browsable
pages.

Thanks in advance.

Bryon



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



Struts, Tiles and Internationalization

2005-10-06 Thread Bryon Lape
A customer of ours has a site that they want to move into Canada.  This
means every page will need to be translated into Canadan French and abide
by Canadian law.  Currently, the site is en_US.  THe site was built using
Struts and Tiles, but the tiles are not defined in Tiles XML, instead
there are a few template JSP using  in the template to
name zones and the pages which use each template use  to
load the template and  to give a value for each named zone. 
I am seeking pointers on how best to change this to allow for language.

Do I need to put each page as a defintion in the tiles XML?  If the
inserts are made not to be direct put instead include file fragments, how
do I then choose a language?  This site currently has about 40 browsable
pages.

Thanks in advance.

Bryon


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



Re: Struts Tiles and Internationalization

2004-10-29 Thread Christian Hesse
Thank you very much, it works fine!

"Struts Users Mailing List" <[EMAIL PROTECTED]> schrieb am 27.10.04 11:30:26:
> 
> You can put what ever you like in the tile attributes.  I store the 
> resource keys so that they can be looked up depending on locale.
> 
> Example - using a welcome page and a view shopping cart page
> 
> In your tiles definition
> 
> welcome page:
> 
> 
> ...
> 
> 
> shopping cart page:
> 
> 
> ...
> 
> 
> In your template page
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> in your application.properties etc
> welcome.title=Hello
> cart.view.title=View Shopping Cart
> 
> 
> -- 
> Jason Lea
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193


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



Re: Struts Tiles and Internationalization

2004-10-27 Thread Scott Piker
It's actually pretty straightforward.  Just define a "title" attribute in your 
tiles-defs, as you would any other attribute.  Override it for each page that requires 
a different title.  For example:

tiles-defs.xml:
*
  
  
  
  
  
  
  
  
  

Then, adjust your templates so that your header tile renders the  and  
html tags.  Pass the "title" attribute into your header tile when inserting it:

baseTemplate.jsp:
*
<%@ taglib uri="/WEB-INF/struts-tiles.tld"  prefix="tiles" %>





...


Then just use this attribute in your header.jsp.  

header.jsp:
*
<%@ taglib uri="/WEB-INF/struts-tiles.tld"  prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-html.tld"  prefix="html" %>




...


HTH,
- Scott



>>> [EMAIL PROTECTED] 10/27/2004 3:26:14 AM >>>
Hi all!

I have a small problem:

I am creating a web-application with struts, which contains many jsp-pages. At the 
moment I use the concept copy & pasting the layout into each page. I read much about 
including parts by jsp-commands, templates and tiles and try to use tiles. But I do 
have one big problem with that:

I have my template looking like that: 









I know, it looks nice, but I have the problem, that each page has to choose another 
title, which is in my Ressource-Properties and to make it more complicated, I develop 
it with internationalization. I also have to use the title in the "head"-section, but 
I think the reuse is no problem.

How can I configure a key, which will be resolved in the RessourceBundles to give me 
the language- and page-dependent title?

Any suggestions?

Bye

Christian 

Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193 


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




This message has originated from R.L. Polk & Co.,
26955 Northwestern Highway Southfield, MI 48034

R. L. Polk & Co. sends various types of e-mail
communications. If this email message concerns the
potential licensing of a Polk product or service, and
you do not wish to receive further emails regarding Polk
products, forward this email to [EMAIL PROTECTED]
with the word "remove" in the subject line.

The email and any files transmitted with it are confidential
and intended solely for the individual or entity to whom they
are addressed.

If you have received this email in error please delete this message
and notify the Polk System Administrator at [EMAIL PROTECTED] 

* 


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



Re: Struts Tiles and Internationalization

2004-10-27 Thread Jason Lea
You can put what ever you like in the tile attributes.  I store the 
resource keys so that they can be looked up depending on locale.

Example - using a welcome page and a view shopping cart page
In your tiles definition
welcome page:

   
   ...

shopping cart page:

   
   ...

In your template page








in your application.properties etc
welcome.title=Hello
cart.view.title=View Shopping Cart

Christian Hesse wrote:
Hi all!
I have a small problem:
I am creating a web-application with struts, which contains many jsp-pages. At the moment 
I use the concept copy & pasting the layout into each page. I read much about 
including parts by jsp-commands, templates and tiles and try to use tiles. But I do have 
one big problem with that:
I have my template looking like that: 








I know, it looks nice, but I have the problem, that each page has to choose another title, which 
is in my Ressource-Properties and to make it more complicated, I develop it with 
internationalization. I also have to use the title in the "head"-section, but I think 
the reuse is no problem.
How can I configure a key, which will be resolved in the RessourceBundles to give me 
the language- and page-dependent title?
Any suggestions?
Bye
Christian 

Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193

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


--
Jason Lea

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


Struts Tiles and Internationalization

2004-10-27 Thread Christian Hesse
Hi all!

I have a small problem:

I am creating a web-application with struts, which contains many jsp-pages. At the 
moment I use the concept copy & pasting the layout into each page. I read much about 
including parts by jsp-commands, templates and tiles and try to use tiles. But I do 
have one big problem with that:

I have my template looking like that: 









I know, it looks nice, but I have the problem, that each page has to choose another 
title, which is in my Ressource-Properties and to make it more complicated, I develop 
it with internationalization. I also have to use the title in the "head"-section, but 
I think the reuse is no problem.

How can I configure a key, which will be resolved in the RessourceBundles to give me 
the language- and page-dependent title?

Any suggestions?

Bye

Christian 

Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193


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