Our code uses the "Plugin" model, which remotely loads a dll corresponding to the predefined IPluginModel structure, which is defined in the main program. The main program itself has several localized forms, where the text and placement of labels in the user interface change depending on the different localization of Thread.CurrentThread.CurrentUICulture .
We noticed that any forms or reports from the remote DLL will never be correctly localized. It does not seem to matter where the dll localization is located, containing different resources for the plugin, either next to the main form, next to the plugin board, or elsewhere. How can I make an assembly correctly localize its localized resources when the assembly itself is loaded during the RunTime of the main program?
I have code that more closely resembles the method used here , but doesn’t want to manually implement resx against the form itself, if at all possible. The code that I have is directly inside the plugin itself and is called whenever CurrentUICulture is not "en-US".
Ideally, what I'm looking for is a way to load pluginName.resources.dll , which is directly related to the downloaded plugin. I see various folders in my main bin folder for projects, the es folder contains main.resources.dll , but just placing the dll plugins in this folder did not seem to work the last time I tried it, although theoretically this could change ... or I may have done it wrong at the time ...
Download assembly [code snippet]
private void LoadPlugin(string filePath) { bool isValidPlugin = false; Assembly asm = null; try { asm = Assembly.LoadFrom(Path.Combine(Environment.CurrentDirectory, filePath));
Edit: More thoughts on the topic
Is there a way to intercept the boot structure that is trying to resolve satellite assemblies, an event that I can implement, or a function that I can override, where I can manually point the code to the correct assembly of resources ?. I found some things about build resolution, but it was for direct download, not satellite resources.