none
Satellite assembly is loaded, but the strings are still in English RRS feed

  • Question

  • I have a WPF application with .resx resource file. I use resgen and AL.exe to get the satellite assembly and the English strings are embedded in the exe itself. I'm trying to test if localization is working or not.

    I added code in App.xaml.cs to set CurrentCulture and CurrentUICulture to tk-TM and placed the satellite assembly under .\tk-TM folder.

    This is the output from FUSLOGVW, which shows that it is successfully binding to the satellite assembly. But the text is always in English. I wanted to eliminate the case of satellite assembly also having English strings and recompiled the EXE with different strings expecting to see the old version of strings in the satellite assembly. But I see that the satellite assembly binding is successful and the embedded new version of strings being displayed.

    LOG: This bind starts in default load context. LOG: Using application configuration file: D:\office\enduser\sconline\UI\Site\bin\NDESConnectorUI.exe.Config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Post-policy reference: NDESConnectorUI.resources, Version=5.0.0.0, Culture=tk-TM, PublicKeyToken=31bf3856ad364e35 LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///D:/office/enduser/sconline/UI/Site/bin/tk-TM/NDESConnectorUI.resources.DLL. LOG: Assembly download was successful. Attempting setup of file: D:\office\enduser\sconline\UI\Site\bin\tk-TM\NDESConnectorUI.resources.dll LOG: Entering run-from-source setup phase. LOG: Assembly Name is: NDESConnectorUI.resources, Version=5.0.0.0, Culture=tk-TM, PublicKeyToken=31bf3856ad364e35 LOG: Binding succeeds. Returns assembly from D:\office\enduser\sconline\UI\Site\bin\tk-TM\NDESConnectorUI.resources.dll. LOG: Assembly is loaded in default load context.

    1. Is there a way to look into the actual strings stored inside the satellite assembly?

    2. How to troubleshoot why the localized strings are not being shown even when binding is successful?

    Thanks!

    Saturday, August 30, 2014 11:47 PM

Answers

  • Problem solved.

    I got confused with the naming of .resources files. The .resources.dll file that my exe was looking for was UI.resources.dll, but the .resources file expected was UI.Strings.resources.dll. Once I made the change to name the .resources files correctly, my EXE started picking up the localized strings.

    RESGEN_SOURCES=\
        ..\UI\Strings.resx,UI.Strings.resources

    To solve the issue, I changed my code to build localized EXE in Visual Studio(by adding Strings.tk-TM.resx) and used ILDASM to figure out the resources name.

    Thanks.
    • Marked as answer by psanaga Sunday, August 31, 2014 8:13 AM
    Sunday, August 31, 2014 8:13 AM