To read a resource for a default culture I'd do this:
object obj = GetLocalResourceObject("MyTextResourceID.Text");
But what I need is to do the same but to be able to specify a culture for the resource. So I tried this:
System.Globalization.CultureInfo cultInfo =
new System.Globalization.CultureInfo("en-US");
object obj = HttpContext.GetLocalResourceObject(
"~/" + Path.GetFileName(this.Request.PhysicalPath),
"MyTextResourceID.Text",
cultInfo);
but it always returns obj
as null. Any idea why?