I'm working on localization for my project. For this, I have a class which should load an embedded resource from another assembly, and then read out the strings.
But also I need to know which resource files this assembly contains. The number and which languages those are, is unknown.
So how do I find out how the ".resx" file in this assembly is named? Those all have the same scheme: "de-DE.resx", "en-US.resx", and so on.
I need to know how many of those files are contained in this assembly, and which languages they are.
I know that the ResourceManager has access to them, thus it should be possible to access this information programatically too...
You should use GetManifestResourceNames
method from Assembly
class (msdn):
string[] resourceNames = this.GetType().Assembly.GetManifestResourceNames();
foreach(string resourceName in resourceNames)
{
Console.WriteLine(resourceName);
}