You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Marcel Schepers <ma...@gmail.com> on 2006/05/10 09:04:59 UTC

General architecture question regarding localization

Hello,

About two years ago there was a discussion on this list entitled 'General
architecture question regarding localization' which covered the question how
to get i18n messages when dealing with component specific property files is
not an option. Since the discussion was alive more than two years ago the
version discussed was Tapestry 3 and as such no usable in a Tapestry 4
environment.

Now I am about to start a new project based on Tapestry 4. One of the
requirements is to support messages in 5 different languages. What I would
like to do is to store all messages in a database, perhaps even in one table
(component, locale, key, message with a multi-column primary key).  My
question is how to implement this using Hivemind's  localization Messages
interface in combination with Tapestry's ResourceLocalizer interface.

This will be my first T4 project and to fill the T4 knowledge gap I have
started reading the Javadocs and Kent Tong's T4 work.  My first guess is to
implement a ResourceLocalizer returning a Hivemind Resource that has
knowledge about the dbms along with some form of caching. I would also need
an implementation of Messages for the actual retrieval of the message
strings. But then it stops, I can not figure out how a Hivemind Resource is
connected with a Messages implementation and to instruct Tapestry to use
these dedicated implementations?

Is this the way I am supposed to tackle this problem? Are there alternative
approaches? Did I miss an article or Wiki page? For me Tapestry 4 and
Hivemind are both new and I am looking for any info on how to handle this.

Have a nice day,
Marcel

Re: General architecture question regarding localization

Posted by Marcel Schepers <ma...@gmail.com>.
Yes! Excellent, thank you.

Marcel

On 5/10/06, Hugo Palma <hu...@gmail.com> wrote:
>
> Is this what you need
> http://wiki.apache.org/tapestry/UsingCustomResourceSource ?
>
> On 5/10/06, Marcel Schepers <ma...@gmail.com> wrote:
> >
> > Hello,
> >
> > About two years ago there was a discussion on this list entitled
> 'General
> > architecture question regarding localization' which covered the question
> > how
> > to get i18n messages when dealing with component specific property files
> > is
> > not an option. Since the discussion was alive more than two years ago
> the
> > version discussed was Tapestry 3 and as such no usable in a Tapestry 4
> > environment.
> >
> > Now I am about to start a new project based on Tapestry 4. One of the
> > requirements is to support messages in 5 different languages. What I
> would
> > like to do is to store all messages in a database, perhaps even in one
> > table
> > (component, locale, key, message with a multi-column primary key).  My
> > question is how to implement this using Hivemind's  localization
> Messages
> > interface in combination with Tapestry's ResourceLocalizer interface.
> >
> > This will be my first T4 project and to fill the T4 knowledge gap I have
> > started reading the Javadocs and Kent Tong's T4 work.  My first guess is
> > to
> > implement a ResourceLocalizer returning a Hivemind Resource that has
> > knowledge about the dbms along with some form of caching. I would also
> > need
> > an implementation of Messages for the actual retrieval of the message
> > strings. But then it stops, I can not figure out how a Hivemind Resource
> > is
> > connected with a Messages implementation and to instruct Tapestry to use
> > these dedicated implementations?
> >
> > Is this the way I am supposed to tackle this problem? Are there
> > alternative
> > approaches? Did I miss an article or Wiki page? For me Tapestry 4 and
> > Hivemind are both new and I am looking for any info on how to handle
> this.
> >
> > Have a nice day,
> > Marcel
> >
>
>

Re: General architecture question regarding localization

Posted by Hugo Palma <hu...@gmail.com>.
Is this what you need
http://wiki.apache.org/tapestry/UsingCustomResourceSource ?

On 5/10/06, Marcel Schepers <ma...@gmail.com> wrote:
>
> Hello,
>
> About two years ago there was a discussion on this list entitled 'General
> architecture question regarding localization' which covered the question
> how
> to get i18n messages when dealing with component specific property files
> is
> not an option. Since the discussion was alive more than two years ago the
> version discussed was Tapestry 3 and as such no usable in a Tapestry 4
> environment.
>
> Now I am about to start a new project based on Tapestry 4. One of the
> requirements is to support messages in 5 different languages. What I would
> like to do is to store all messages in a database, perhaps even in one
> table
> (component, locale, key, message with a multi-column primary key).  My
> question is how to implement this using Hivemind's  localization Messages
> interface in combination with Tapestry's ResourceLocalizer interface.
>
> This will be my first T4 project and to fill the T4 knowledge gap I have
> started reading the Javadocs and Kent Tong's T4 work.  My first guess is
> to
> implement a ResourceLocalizer returning a Hivemind Resource that has
> knowledge about the dbms along with some form of caching. I would also
> need
> an implementation of Messages for the actual retrieval of the message
> strings. But then it stops, I can not figure out how a Hivemind Resource
> is
> connected with a Messages implementation and to instruct Tapestry to use
> these dedicated implementations?
>
> Is this the way I am supposed to tackle this problem? Are there
> alternative
> approaches? Did I miss an article or Wiki page? For me Tapestry 4 and
> Hivemind are both new and I am looking for any info on how to handle this.
>
> Have a nice day,
> Marcel
>

Re: General architecture question regarding localization

Posted by Sam Gendler <sg...@ideasculptor.com>.
I don't have an answer to your question, I'm afraid, although i am
pretty sure you are heading in the right direction (I really wish
there was a lot more documentation about using hivemind with Tap4,
especially if it focuses on hivemind neophytes). I am definitely
interested in your solution, however, so please post it back here if
you can.  It would be a lot easier for me to build a small webapp that
our translators could use to post translations directly into the
application, rather than forcing them to go through a bundle of
.properties files before every release.

--sam

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