S
scpedicini
Let's say that I've built an assembly called MyApi.dll with two
different language resource files, one called DefaultResource.resx
(which is my english resource file), and a german resource file called
DefaultResource.de.resx. However, I would like both of these files to
live inside MyApi.dll. Inside MyApi.dll, I have a ResourceManager that
is loaded using:
new System.Resources.ResourceManager("MyNamespace.DefaultResource",
Assembly.GetExecutingAssembly());
However, is it possible to make the ResourceManager load the correct
resource file based on the Current UI language ? I was thinking of just
trying to load a resource string called:
string resFile = "MyNamespace.DefaultResource." +
CultureInfo.CurrentUICulture.Name;
If this file does not exist, then the ResourceManager will use the
default DefaultResource. Unfortunately, I cannot make use of satellite
assemblies at this time, so does this seem like a reasonable solution?
Thanks for any assistance,
Shaun
different language resource files, one called DefaultResource.resx
(which is my english resource file), and a german resource file called
DefaultResource.de.resx. However, I would like both of these files to
live inside MyApi.dll. Inside MyApi.dll, I have a ResourceManager that
is loaded using:
new System.Resources.ResourceManager("MyNamespace.DefaultResource",
Assembly.GetExecutingAssembly());
However, is it possible to make the ResourceManager load the correct
resource file based on the Current UI language ? I was thinking of just
trying to load a resource string called:
string resFile = "MyNamespace.DefaultResource." +
CultureInfo.CurrentUICulture.Name;
If this file does not exist, then the ResourceManager will use the
default DefaultResource. Unfortunately, I cannot make use of satellite
assemblies at this time, so does this seem like a reasonable solution?
Thanks for any assistance,
Shaun