Pass parameter to visual plugin from Delphi host before WinForms InitializeComponent()

I need to set a value before InitializeComponent() in the constructor of a visual plugin, namely the UICulture for localization of my component ( Is there a way to specify a parameter to the constructor of a visual plugin, or some way to specify a parameter value before InitializeComponent() runs? One alternative option I can think of is to use a registry key or preferences file, but this isn’t what I’m looking for.

[Plugin, VisualPlugin]
public partial class MyVisualPlugin : VisualPlugin, MyCustomInterface
public MyVisualPlugin()
// need to set locale based on a parameter (integer code or string)
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(“de-DE”);
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(“de-DE”);


Unfortunately ir is not possible to pass anything to the plugin’s constructor. As a workaround you could create one more plugin for configuration purposes (ie set the required parameters, store them in some static variable and then use in the plugin’s constructor).


Thanks, I think this is a better workaround than a registry key or preferences file.