RE: RE: t5: i18 messages without different locale files

2007-06-20 Thread Kristian Marinkovic
hi tina,  in your Module Class (AppModule, or WebappnameModule) you can contributeyour own BindingFactory with following method: public static void contributeBindingSource(    MappedConfiguration configuration,)    {    configuration.add("messagedb", new MessagedbBindingFactory(db));} When tapestry recognizes your prefix it calls your factory to obtaina Binding instance. Before you return the binding instance you of have to lookup the message key in your database. please take a look at theMessageBindingFactory class... this class does exactly what you need...except that you have to inject your db source :) g,kris-Tina Umlandt <[EMAIL PROTECTED]> schrieb: -An: users@tapestry.apache.orgVon: Tina Umlandt <[EMAIL PROTECTED]>Datum: 20.06.2007 04:51PMThema: RE: RE: t5: i18 messages without different locale filesHi,:-D ... thats what I want to do ..But can you tell me how I could do this? Where do I register a new BindingFactory for a new keyword?Thx,Tinayou could contribute an own BindingFactory for "messagedb:"...gkrisTina Umlandt <[EMAIL PROTECTED]>20.06.2007 15:27Bitte antworten an"Tapestry users" Anusers@tapestry.apache.orgKopieThemat5: i18 messages without different locale filesHi,I have the following issue.I want to internationalize my application without using the localed files.The administrator of my application should beable to write or change the texts for the template by himself. These textsare stored in a postgres db.Therefore i.e. I want to override the binding mechanism for "message" sothat it uses instead of the default messages myown DBMessagesImpl.In the tapestry source code I found the line where the "message" isconnected with the MessageBindingFactory but I seeno way to interfere this mechanism and change it so that "message" isconnected with another BindingFactory.Have you any suggestions? And thx for your help.Regards,                 Tina-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]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RE: t5: i18 messages without different locale files

2007-06-20 Thread Tina Umlandt

Hi,

:-D ... thats what I want to do ..
But can you tell me how I could do this? Where do I register a new 
BindingFactory for a new keyword?

Thx,
Tina



you could contribute an own BindingFactory for "messagedb:"...

g
kris




Tina Umlandt <[EMAIL PROTECTED]>
20.06.2007 15:27
Bitte antworten an
"Tapestry users" 


An
users@tapestry.apache.org
Kopie

Thema
t5: i18 messages without different locale files






Hi,

I have the following issue.
I want to internationalize my application without using the localed files.
The administrator of my application should be
able to write or change the texts for the template by himself. These texts
are stored in a postgres db.
Therefore i.e. I want to override the binding mechanism for "message" so
that it uses instead of the default messages my
own DBMessagesImpl.

In the tapestry source code I found the line where the "message" is
connected with the MessageBindingFactory but I see
no way to interfere this mechanism and change it so that "message" is
connected with another BindingFactory.

Have you any suggestions? And thx for your help.

Regards,
 Tina

-
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]