Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could not find any resources appropriate for the specified culture

Status
Not open for further replies.

Kavius

Programmer
Apr 11, 2002
322
CA
I'm working from the example given here:

I keep receiving an error:
[tt]
Could not find any resources appropriate for the specified culture (or the neutral culture) on disk.
baseName: resource locationInfo: <null> fileName: resource.resources
[/tt]
This occurs the first time I attempt to GetString (line 30 in the sample). I do have the resources files in a folder called resource, and the best I can tell that's where this page should be looking. The resource files are valid, I opened them with a resource editor.

Does anyone have any idea what I am doing wrong?

Relevant code:
[tt]
CultureInfo ci;

switch (Radiobuttonlist1.SelectedValue.ToString()){
case "gu-CH" :
case "pi-TA" :
ci = new CustomGuamCulture("es-ES", Radiobuttonlist1.SelectedItem.Value.ToString(), Radiobuttonlist1.SelectedItem.Text);
break;
default :
ci = new CultureInfo(Radiobuttonlist1.SelectedValue.ToString());
break;
}

Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;

ResourceManager rm = ResourceManager.CreateFileBasedResourceManager("resource", Server.MapPath("resources") + Path.DirectorySeparatorChar, null);

lblGreeting.Text = rm.GetString("Greeting");
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top