As far as application localization, what you are doing is switching from GWT implicitly loading your i18n messages as part of the application's static resources, to explicitly loading your messages from the server.
You mention your application is "all SmartGWT client talking to API's", from that point of view, what you need is a new API that takes a locale and returns a bundle of messages, probably as a Java Map. You can then store that Map as a static variable and use it in the ordinary Java way; there is no reason to think about this in terms of JavaScript at all.
For example, let's say you define a class I18N with a static Map "messages" and populate it, then you are creating a "Save" button at some point whose title needs to react to the locale:
Code:
myButton.setTitle(I18N.messages.get("saveButtonTitle"));
Leave a comment: