Is this what you need http://wiki.apache.org/tapestry/UsingCustomResourceSource ?
On 5/10/06, Marcel Schepers <[EMAIL PROTECTED]> 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
