Determining supported cultures.


still diving in your code, the following statements seems not to be of any use:
var assemblyLocation = Path.GetDirectoryName(assembly.Location);

// Get all directories named like a specific culture.
var dirs = Directory.GetDirectories(assemblyLocation, "??-??").ToList();
// Get all directories named like a culture.
dirs.AddRange(Directory.GetDirectories(assemblyLocation, "??"));
(found in ResxLocalizationProviderBase, Lines 361-366)
var dirs
is never used after having been assigned all Directories matching Culture Names:
// Get the list of all cultures.
var cultures = CultureInfo.GetCultures(CultureTypes.AllCultures);

foreach (var c in cultures)
   var dir = Path.Combine(assemblyLocation, c.Name);
   if (Directory.Exists(dir) && Directory.GetFiles(dir, "*.resources.dll").Length > 0)
Thanks for reviewing.
Closed Jul 9, 2013 at 1:11 PM by SeriousM
The dir variable contains all available cultures, either normal ones like "en" or special ones like "en-US".

The foreach loop step through all available cultures and the dir content (remember, the found cultures) is used as a check if the directory should be searched for resource-dlls.

Please open a discussion thread for such questions.