You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bryon Lape <bs...@grey-net.com> on 2005/10/06 18:12:56 UTC

Struts, Tiles and Internationalization

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 <tiles:insert /> in the template to
name zones and the pages which use each template use <tiles:insert /> to
load the template and <tiles:put /> 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts, Tiles and Internationalization

Posted by Bryon Lape <bs...@grey-net.com>.
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 <tiles:insert /> in the template to
>> name zones and the pages which use each template use <tiles:insert /> to
>> load the template and <tiles:put /> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



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


Re: Struts, Tiles and Internationalization

Posted by Danny Lee <ha...@yahoo.de>.
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 <tiles:insert /> in the template to
> name zones and the pages which use each template use <tiles:insert /> to
> load the template and <tiles:put /> 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org