简体   繁体   中英

C# localization not working in Chinese OS but works on Chinese language pack

I have an application which uses resource files to localize text. The EXE is in a separate project and resources are in separate project. When deployed on English OS with Chinese language pack it works fine, but when deployed on complete Chinese OS it does not show Chinese text. I did a assembly binding logging, and found out that the system looks for zh-cn dll and this dll is successfully found and loaded.

If it queries for the DLL why does it still fall back to English? The only reason it would do this is that it does not find the queried string. Any ideas whats going wrong?

I am using the standard resource files with PublicResXFileCodeGenerator to compile my resources and I am using resource properties to refer to the string, also I am not explicitly passing any culture information.

My problem is solved. Here's what had happened. Our build script sets authenticode signing on all DLLs, we had not authenticode signed the zh-cn and ja resource dlls. So looks like .net was not picking up the DLL and defaulting to english.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM