开发者

ResourceManager.GetString() not returning value

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜