www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - Language file support for DWT

reply Frank Benoit <keinfarbton googlemail.com> writes:
For the SWT part of DWT, I added the language files and support for
accessing them in dependency of the current locale. (HG repositories)

Test program:

import dwt.std;
void main() {
	Shell shell = new Shell(Display.getDefault());
	MessageBox.showMessageBox(
		"Dummy text",
		"Title",
		shell,
		DWT.ABORT|DWT.RETRY|DWT.IGNORE|DWT.ICON_QUESTION );
	Display.getDefault().dispose();
	return 0;
}

To compile, please notice that now a new compiler switch (-J) is needed
for the new resource directories in dwt-win/res or dwt-linux/res

Please test if it works for you in your language.
Oct 18 2008
parent Frank Benoit <keinfarbton googlemail.com> writes:
Frank Benoit schrieb:
 For the SWT part of DWT, I added the language files and support for
 accessing them in dependency of the current locale. (HG repositories)
 
 Test program:
 
 import dwt.std;
 void main() {
 	Shell shell = new Shell(Display.getDefault());
 	MessageBox.showMessageBox(
 		"Dummy text",
 		"Title",
 		shell,
 		DWT.ABORT|DWT.RETRY|DWT.IGNORE|DWT.ICON_QUESTION );
 	Display.getDefault().dispose();
 	return 0;
 }
 
 To compile, please notice that now a new compiler switch (-J) is needed
 for the new resource directories in dwt-win/res or dwt-linux/res
 
 Please test if it works for you in your language.

On Windows, the language files are only used for Link, CCombo, CTabFolder. So this example is only useful for Linux users. I added the dwt-samples/user/RetryMessageBox.d This also shows on Windows a sample text that should show up in your language.
Oct 18 2008