Localizing Images and Icons

Last update: December 2016

 

RC-WinTrans lets you "translate" images and icons by using a different image or icon for the target file than the one used in the source file.  For Win32 resource files, images are usually Windows bitmaps (BMP) and icons (ICO).  For .NET resource files, images can be any image format (e.g., Windows bitmap (BMP), JPEG, GIF, or TIFF).

 

Image resources are listed in Project window (Text Table view), and image "translation" (modification) is done through the Translation Edit bar.  The meaning of "image translation" depends on whether the source file is a Win32 resource script file (RC), a program file (EXE, DLL, or OCX), or a .NET Windows Forms file.  In general, images are created and/or edited with an external graphics tool (Figure 3) and RC-WinTrans takes the modified image and uses it for the target file.

 

 

Win32: Images in Resource Script (RC) Files

Bitmaps (binary data) are not actually part of a resource file, but are stored separately in single bitmap files.  The RC file contains the name of the bitmap file, where the file might be put together with a relative path specification plus the file name.  In this context, “translating” bitmaps means (1) having or creating a bitmap file other than the one used in the original source file; and (2) entering this file name in RC-WinTrans’ Translation Edit bar as the translation for the original file name.

 

NOTE: In principle, bitmaps can be included in a resource script file as binary data.  RC-WinTrans does not support binary bitmap translation in resource script files.

 

 

Figure 1: Four image files listed in RC-WinTrans' Text Table view.  Two of the images have been "translated."

 

 

Figure 2: The Translation Edit bar.  The Source edit field shows the original bitmap file name ("res\\MFC-EN.bmp") in addition to the bitmap itself.  The file name of the target bitmap has been entered in the Translation edit field ("res\\MFC-SE.bmp").

 

 

These images are "translated" (localized) as follows:

 

1.

Select the image in the Text Table view (Figure 1).

2.

In the Translation Edit bar (Figure 2), use the Open Image File command below the Source edit field to open the source image.  RC-WinTrans will open the image file with an external graphics tool (Figure 5).

3.

Save the opened source file under a different file name (the target file name) with the graphics tool.

4.

Edit the image with the external graphics tool and save the file afterwards.

5.

Use the Load from File command below the Target edit field in the Translation Edit bar and select the image file.  RC-WinTrans will use the name of the file as the file name in the translated RC file.

 

 

Images in Win32 EXE/DLL Files and .NET Files

Win32 binary files and all .NET files have images included as binary data in the source file.  An image is "translated" by editing the image file externally (with an external tool) and using the Load from File command (Translation Edit bar) to tell RC-WinTrans to copy the data from the file into the translation database. The binary data will be included in the translated target file.

 

 

Figure 3: Four image resources (binary data) listed in RC-WinTrans' Text Table view.  Two of the images have been "translated," as indicated by the Image symbol in the "Target Language" column (here: Swedish).

 

 

Figure 4: The bitmap from the source file shown in Figure 3 opened and ready to be edited in Microsoft Paint.

 

 

These images are "translated" (localized) as follows:

 

1.

Select the image in the Text Table view (Figure 3).

2.

In the Translation Edit bar, use the Save to File command below the Source edit field to save the source image to a file for editing.

3.

Edit the image with the external graphics tool and save the file afterwards.

4.

Use the Load from File command below the Target edit field in the Translation Edit bar and select the image file.  RC-WinTrans will import the image data from the file to be used as the target image.

 

The Copy to Clipboard command can be used to copy the image to the clipboard and paste it into an external graphics application where it can be modified and saved as the target image in the manner described above.

 

 

External Graphics Tools

The external graphics tool used to modify specific image types can be specified on the External Tools property page in the Options dialog box.  RC-WinTrans uses Microsoft Paint ("mspaint.exe") as the default application for opening and editing images.

 

 

Figure 5: The bitmap from the source file shown in Figures 2 and 4 opened and ready to be edited in Microsoft Paint.

 

 

Displaying Images in RC_WinTrans

Image resources must be set to be visible in order for them to be listed in the Text Table view.  To show/hide images, use the Show Only Image Resources button in the Project Data view to isolate all images in the project in the Text Table view.

 

 

Deleting an Image

To delete a target image, select the image in the Text Table view and use the "Delete" key or the Delete command button in the Translation Edit bar.

 

 

Check Functions

RC-WinTrans is equipped with a special check function to verify that a translated image has the same size and color depth as the original image.

 

^ TOP ^