开发者

ResourceManager.GetString() not returning value

开发者 https://www.devze.com 2023-03-25 19:02 出处:网络
I am trying to implement multiple language support for my web project. I am new to it. I amnot able to get the resource file value by using ResourceManager.GetString() function. I am p开发者_开发技巧

I am trying to implement multiple language support for my web project. I am new to it.

I am not able to get the resource file value by using ResourceManager.GetString() function. I am p开发者_开发技巧assing the name and current CuluralInfo. The resource file present in my App_GlobalResources are Sample.resx, Sample.en-us.resx, Sample.zh-cn.resx and Sample.ar-sa.resx. I am having a name field named "Heading1" and its value in all the resource files

My code is like

  string Heading1= Resources.Global.ResourceManager.GetString(("Heading1", Thread.CurrentThread.CurrentCulture);

But it is always returning null value. Please help me to get the solution for this problem

Thanks San


I found the problem

The code should be like

string Heading1= Resources.Sample.ResourceManager.GetString(name, culture_object);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号