问题描述
我有一个Web应用程序,应该本地化为3种语言。所有控件都从该语言的Resx文件中获取控件文本。现在,如果我们有一条消息,可以显示针对该特定文化的自定义错误消息。所以为此,我创建了一个单独的Foldere作为资源,并创建了一个resx作为DialogMessages.ar-IQ.resx。
如何阅读 DialogMessages.ar-IQ.resx 在C#中?
我试图使用ResxResourceReader类读取文件。这是一个正确的过程还是存在任何缺陷?
I have a web application which should be Localized to 3 languages. All the controls are taking the control text from the Resx file of that language. Now I have scenario like suppose if we have a messages,custom error messages to show for that particular culture. So for this I have created a seperate Foldere as "Resources" and created a resx as "DialogMessages.ar-IQ.resx".
How can I read the "DialogMessages.ar-IQ.resx" in C# ?
I have tried to read the file using ResxResourceReader class. Is this a correct process or any flaw exists ?
这篇关于如何使用C#读取资源文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!