I'm working on a localized application which I develop in SharpDevelop. Based on a tutorial I ran into an error:
Could not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName:
I created the ressource file using Project | Add | New item respective "Empty ressource file" (I couldn't find "Assembly Resource file"). Furthermore I've set the "Build action" to "EmbeddedResource".
Within the program I have a class which does the following
// load the resource file once
resourceManager = ResourceManager.CreateFileBasedResourceManager(file, filePath, null);
// depending on user selection, I set the CultureInfo in the code behind the form, i.e.
Thread.CurrentThread.CurrentUICulture = locales[0]; // which contains "en"
// and that's the method of the same class used to lookup the values
public string getValue ( string key )
{
return resourceManager.GetString(key);
}
SharpDevelop 3.0.0.3437 .NET Version 2.0.50727.3053
Even after carefully going through the comments and googling for a long while, I couldn't find an example or a solution. Hence the questions:
- How can I add the culture to the ressource file itself?
- Can you provide an example or link?
Many thanks!