Y
Yoavo
Hi,
I am trying to localize my application but I have some difficulties doing
it.
In my application I need to load the translated resource from a specific
folder (that the user determine using the command line argument ).
My application contains an .exe with a form with buttons which their text is
taken from a DLL.
The DLL was translated and the satellite translated dll is placed in a
certain folder.
In the code I load the translated file to an Assembly, create a
ResourceManager from this Assembly, and try to get the text using GetString
method.
I get an exception when calling GetString method.
This is my code:
string aResourceFile = System.IO.Path.Combine(mResourcePath,
"TestRC.resources.dll");
System.Reflection.Assembly ResourceAssembly =
System.Reflection.Assembly.LoadFile(aResourceFile);
ResourceManager rm = new ResourceManager("TestRC",
ResourceAssembly);
string res= rm.GetString(iName);
return res;
When calling to GetString I get a
System.Resources.MissingManifestResourceException:
"Additional information: Could not find any resources appropriate for the
specified culture or the neutral culture. Make sure "TestRC2.resources" was
correctly embedded or linked into assembly "TestRC2.resources" at compile
time, or that all the satellite assemblies required are loadable and fully
signed."
Can someone please help or advice?
thanks,
Yoav.
I am trying to localize my application but I have some difficulties doing
it.
In my application I need to load the translated resource from a specific
folder (that the user determine using the command line argument ).
My application contains an .exe with a form with buttons which their text is
taken from a DLL.
The DLL was translated and the satellite translated dll is placed in a
certain folder.
In the code I load the translated file to an Assembly, create a
ResourceManager from this Assembly, and try to get the text using GetString
method.
I get an exception when calling GetString method.
This is my code:
string aResourceFile = System.IO.Path.Combine(mResourcePath,
"TestRC.resources.dll");
System.Reflection.Assembly ResourceAssembly =
System.Reflection.Assembly.LoadFile(aResourceFile);
ResourceManager rm = new ResourceManager("TestRC",
ResourceAssembly);
string res= rm.GetString(iName);
return res;
When calling to GetString I get a
System.Resources.MissingManifestResourceException:
"Additional information: Could not find any resources appropriate for the
specified culture or the neutral culture. Make sure "TestRC2.resources" was
correctly embedded or linked into assembly "TestRC2.resources" at compile
time, or that all the satellite assemblies required are loadable and fully
signed."
Can someone please help or advice?
thanks,
Yoav.