Reputation: 23
there are three (open) questions about the internationalization of GWT, I have:
1) Is it a (huge) performance issue, to use only "Messages" for constant and parameterized text (that's possible), where you would use both "Messages" and "Constants" usually?
2) Is there a way to specify the original text in the source code, whose translations can then be specified somewhere? (e.g. Translate("Hello")
in the source code and than in a properties file for e.g. spanish: Hello = ¡Hola!
)
3) Do you know any translation-tools, which generate the properties and interfaces for you?
Thanks in Advance!
Upvotes: 2
Views: 519
Reputation: 7021
1) I am not aware of any performance issues with Messages vs Constants. Since all code ends up as fairly optimized JavaScript anyway, it would seem like a minimal issue to me.
2) You can use the DefaultMessage
annotation:
@DefaultMessage("Hello")
String hello();
In this case, if no corresponding translation file is found, the default message is used.
3) i18nCreator
Upvotes: 5