You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mark Stang <ms...@pingidentity.com> on 2005/10/05 01:16:11 UTC

3.0.3 Component Localization

Hi,
I am using 3.0.3 and it appears that I must localize at the component level.  I have a single page and I can localize there for "page" specific stuff, however, when I try and localize at the component level it seems to require a .properties file for each component.  Is this true?

thanks,

Mark

Re: 3.0.3 Component Localization

Posted by Daniel M Garland <da...@titanemail.com>.
Hmm that doen't sound right; have you tried getting the locale from the 
enclosing page?

public void yourMethod(IRequestCycle cycle)
{
	IPage page = cycle.getPage("yourpage");
	Locale locale = page.getLocale();
	...

why do you need a .properties file?

Dan

Mark Stang wrote:
> Hi,
> I am using 3.0.3 and it appears that I must localize at the component level.  I have a single page and I can localize there for "page" specific stuff, however, when I try and localize at the component level it seems to require a .properties file for each component.  Is this true?
> 
> thanks,
> 
> Mark
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________

-- 

Dan Garland
------------------------
dmgarland@bigfoot.com
mob: +44 (0) 7979 770053
icq: 120963437
aim: dmgarland1767


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

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


Re: 3.0.3 Component Localization

Posted by Howard Lewis Ship <hl...@gmail.com>.
That is true; each page and each components has its own, individual
message catalog.

4.0 allows each application/library to provide default messages for
all the contained pages and components.

On 10/4/05, Mark Stang <ms...@pingidentity.com> wrote:
> Hi,
> I am using 3.0.3 and it appears that I must localize at the component level.  I have a single page and I can localize there for "page" specific stuff, however, when I try and localize at the component level it seems to require a .properties file for each component.  Is this true?
>
> thanks,
>
> Mark
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: 3.0.3 Component Localization

Posted by Ron Piterman <rp...@gmx.net>.
In Tapestry 3 AND in tapestry 4 each component has its own .properties 
file for its resources.

You could however access the messages of your page using the ognl 
page.getMessage('key')

but you can not use <span key="..."> in your template in this way...

Cheers,
Ron

PS - I would consider the design you are using. If a component is to be 
used only in one page, you could use a block instead. A Part of the Idea 
of a component is that you can drop it everywhere...

ציטוט Mark Stang:
> Hi,
> I am using 3.0.3 and it appears that I must localize at the component level.  I have a single page and I can localize there for "page" specific stuff, however, when I try and localize at the component level it seems to require a .properties file for each component.  Is this true?
> 
> thanks,
> 
> Mark
> 


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