Thanks for the answer Andre.
I'll try to describe the way i have chosen to solve this.
I have created a TextBundle that is pretty much a simple MapString,
String. I have also created a TextPresenter interface that defines
two methods.
SetString getTextKey()
void setTextBundle(TextBundle texts)
There is also a clientside TextManager that takes a TextPresenter and
does a async call to the server to get the bundle for the keys. When
it gets the bundle the TextManager will call the setTextBundle on the
TextPresenter and leaves it to the TextPresenter to update the view
with new texts.
Regards,
Arjan
On 5 jul, 22:54, André Moraes andr...@gmail.com wrote:
Well,
You can create a class that wraps a JavaScriptObject which contains a
Dictionary with your keys and values.
And before starting your application you can make a HTTP Request to
fetch the JSON data (or part of it).
Than in the server-side your write some code that send the values from
the database in the JSON format.
Of course you should not download all the keys from the DB at the same
time, but you can download part of it when you need.
Since you will use the MVP, you can write custom events when the
download of the JSON strings success or fail.
On 5 jul, 17:14, arjanDOTTYbroerATgmailDOTTYcom
arjan.br...@gmail.com wrote:
Hi there,
For a client i'm in search for a solution to I18N and dynamic texts.
Could you help me out in finding the most suitable design strategy for
this problem?
The application has some texts like menu items, headers, introduction
paragraphs and help texts. These texts should come from some database
tables and should be in different languages. Texts may also very on
the user role and the company where the user is employed.
Of course i would like to inject the views (i'm using the MVP pattern
from the Contacts example) with some class that implements a
textBundle interface or something like that. The Messages and
Constants strategy comes very close, but it depends on property files.
The client really wants to connect to the database with a homebrew MS
Access client.
Any suggestions are welcome.
Regards,
Arjan
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.