Localizing Message Strings

Each message string that you specify in the manifest must reference a string in the localization section of the manifest. The localization section contains a string table section for each locale that you support.

The following example shows how to define a string table. You must specify the string's id and value attributes. You use the value of the id attribute to reference the string in your manifest. The value attribute contains the localized string.


            <provider name="Microsoft-Windows-SampleProvider" 
                resourceFileName="<path to the exe or dll that contains the metadata resources>" 
                messageFileName="<path to the exe or dll that contains the string resources>"

                . . .


        <resources culture="en-US">
                <string id="ProviderName" value="Sample Provider"/>
                <string id="PathNotFound" value="The path %1 was not found."/>


Instead of adding localized strings to the manifest, you should create a multilingual user interface (MUI) file for each language that you support. Use a message text file to specify your localized strings.

The following procedure describes how to create a MUI file for English and French.

Dd996927.wedge(en-us,VS.85).gifTo create a MUI file for English and French

  1. Create a message text file that creates the French message strings. For details on creating a message text file, see Message Text Files. The message identifiers that you specify in the message text file must match the resource identifiers that the message compiler generated for the same strings in the manifest. To determine the resource identifiers used for the strings in the manifest, see the .h file that the message compiler generated when you compiled the manifest.
    ; // The following are message definitions.
  2. Run the following commands to create the resource DLL that contains your localized strings. The messages.mc file is the message text file that you created in step 1.
    mc -u -U messages.mc
    rc -r messages.rc
    link -dll -noentry -out:messages.dll messages.res
  3. In the folder that contains your provider, create a subfolder for each locale that you support. The name of the subfolder must be the language name for that locale. For example, for 0x0409, use en-US as the folder name.
  4. Create a .rcconfig file that tells the Muirct.exe tool that you want to split the message string resources from the executable and the resource DLLs. The following is an example .rcconfig file.
                <win32Resources fileType="Application">
                            <resourceType typeNameId="#11"/>
  5. Run the following Muirct.exe commands to split the English strings from the provider executable file.
    muirct -q split.rcconfig -v 2 -x 0x0409 -g 0x0409 provider.exe provider.exe.ln en-US\provider.exe.mui
    muirct -c provider.exe.ln -e en-US\provider.exe.mui
  6. Run the following Muirct.exe commands to split the French strings from the resource DLL. Remove the language neutral file (fr-FR\messages.dll) after the MUI file is created.
    muirct -q split.rcconfig -v 2 -x 0x040C -g 0x0409 messages.dll fr-FR\messages.dll fr-FR\provider.exe.mui
    muirct -c provider.exe.ln -e fr-FR\provider.exe.mui
  7. Rename provider.exe.ln to provider.exe.