How to load C# winform strings from resource file without rebuild

此生再无相见时 提交于 2019-12-11 07:40:01

问题


I have an application developed on .NET CF 3.5 and I try to localize it for multiple languages. I have made a global resource file that is under Properties folder and moved all strings from code and forms to the resource file. What I want to do is to have one resource file. I will translate the file and deploy on each device. But the problem is: if I change the resource file and run the application without rebuild I still see old resources. What I missed to do? I set resource file build action to Embedded resource. Thanks


回答1:


http://www.codeproject.com/KB/dotnet/Localization.aspx

This article discusses how to handle your problem, by using two different approaches.

Option A discusses how to create a sattelite assembly containing a localized version of an embedded resource. This is most likely what you want to do.




回答2:


See if you wish to embed these resources, by selecting Resource -> Properties and Embed Resource. That way, seperate resources files will not be created. Its all bundled.



来源:https://stackoverflow.com/questions/7358831/how-to-load-c-sharp-winform-strings-from-resource-file-without-rebuild

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!