Internationalization/AFC Previous
Previous
Welcome
Welcome
Next
Next

Win32 Resource Loading Sample

To help developers worldwide create multilingual Java business applications, the Microsoft Virtual Machine (VM) for Java supports the Win32 resource file (.res) format. You can use existing Win32 programming and localization tools to rapidly develop and globalize Java applications. By separating resource files from Java source code, it is much easier to localize and run software applications on multiple localized systems (Java sources do not need to be recompiled for each country).

This example demonstrates the use of the supported Win32 resource styles and controls included with the com.ms.ui.resource.Win32ResourceDecoder class. For futher information on the use this class, please refer to the Internationalization article and the SDK for Java API reference documentation.

This is a example of using a single, merged, multilingual resource file -- the same type of file developers use to create multilingual applications. The merged resource file contains English, German, and Japanese resources. Other language resources can be easily added with the use of the resmerge.exe utility, which is found in the \bin directory of the SDK for Java. The Win32ResourceDecoder object automatically detects and downloads the correct language resource based on the default system locale, and displays dialogs using default system fonts.

English(strtable_en.res), Japanese(strtable_ja.res) and German(strtable_de.res) resource files are also provided with this sample. Merge.bat shows you how to merge the files together. If you want to use one language .res file instead of the merged version, you can rename the selected .res file to strtable.res which is required by the source code.

To use this sample, type 'jview GuiApp' from the Win32ResSupport directory. If you run the sample with a localized version (Japanese or German) of the Windows platform, dialogs in the appropriate language will be displayed.


Remarks:
This sample created with Microsoft AFC, and is found in the Samples/Win32ResSupport directory.

Top © 1996-1997 Microsoft Corporation. All rights reserved.