Toggle JFace Dialog Buttons

I am creating a standalone SWT / JFace application.

I used a simple old SWT MessageBox:

int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO; MessageBox messageBox = new MessageBox (getShell(), style); messageBox.setText ("Question"); messageBox.setMessage ("So?"); boolean result = messageBox.open() == SWT.YES; 

I am trying to switch to JFace MessageDialog

 boolean result = MessageDialog.openQuestion(getShell(), "Question", "So?"); 

The problem is that in SWT, the Yes and No button shortcuts are translated in my language, but in JFace it is not. Any idea?

My reference bans are swt 3.8.0, jface 3.8.0 and jface dependencies core.commands 3.6.1 and equinox.common 3.6.100.

+4
source share
2 answers

I had the same problem. I used Messagebox from SWT. Since the OS should take care of translations, I tested it by changing the region settings on the control panel, and this did not help. To do this, we must switch the OS language. For a Windows 7 user, you must upgrade to the final Windows package. And this is how you do it. http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/how-to-change-system-language-of-windows-7-home/d58fb37b-cb02-41c8-986f-22582fd35a12 .

I have not tried, but it is worth taking a picture.

0
source

All Articles