I'm using the SWT Designer to maintain some code that was originally hand-crafted; everything works well except where strings for captions/titles/etc are loaded from a properties file corresponding to the users language - in which case SWT shows nothing. It appears that SWT is not able to load any string which is obtained via a method call, even in this example:
- Code: Select all
public String get(String str) {
return str;
}
protected Control createContents(Composite parent) {
Control contents = super.createContents(parent);
setTitle(get("hello-world"));
This makes working with the design pretty difficult because you can't see which control is which - is there a better way for me to handle translation that SWT can understand? I don't need to see the translated versions, just the message ID that was passed in would be fine.
Thanks,
John