I have created a resource script file(.rc) for my application in order to fill out the file properties of the app, like the description, file version, etc. To do this I filled out the VERSIONINFO resource in the .rc file. My VERSIONINFO resource includes a StringFileInfo block that contains a block of strings for each language I want. It also includes the VarFileInfo block which specifies a translation pair (of the form language key, charset key) corresponding to each block of strings within the StringFileInfo block.
So, the VERSIONINFO resource of my .rc file looks something like this:
1 VERSIONINFO
FILEVERSION 0,2,0,0
PRODUCTVERSION 0,2,0,0
FILEFLAGSMASK 0x0L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40000L
FILETYPE 0x1L
FILESUBTYPE 0x0L
{
BLOCK "StringFileInfo"
{
BLOCK "040904b0"
{
VALUE "FileDescription", "English Title"
VALUE "FileVersion", "0.2.0.0"
}
BLOCK "040a04b0"
{
VALUE "FileDescription", "Titulo Español"
VALUE "FileVersion", "0.2.0.0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1200, 0x40A, 1200
}
}
Now, the problem is that the first pair listed after VALUE "Translation"
is what's always used for the app's file properties. The language that Windows is set to has no effect--I tried changing my Windows language from English to Spanish and then I rebuilt the application, and the properties were still in English. If I then moved the Spanish translation pair--or any other translation like Chinese--to the front, that language was used in the properties.
So how do I get the file properties to show in the language that Windows is set to? If the properties only ever show the first language from the VALUE "Translation"
, what's the point of being able to have multiple translations in the "StringFileInfo" block and "VarFileInfo" block?