I have some html code that I want to replace with text from resources.
My class looks like:
public static class ResourceParser
{
public static string GetTextFromResource(string keyValue)
{
ResourceManager rm = new ResourceManager("pl", Assembly.GetExecutingAssembly());
return rm.GetString(keyValue);
}
}
When I access resources from my view this way:
@Resources.pl.accept;
it works and displays the value I want.
When I do it like this:
@ResourceParser.GetTextFromResource("accept");
there is an exception
MissingManifestResourceException "Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Servers.Resources.resources" was correctly embedded or linked into assembly "myProject" at compile time, or that all the satellite assemblies required are loadable and fully signed."
new ResourceManager('Full.Namespace.WithoutExtension')
. – haldo