C# Hello there,
I am building a Dll where all my CustomControls are located in(Buttons, a Custom MessageBox etc.). I want to use these controls in multiple Applications.
The Applications are multilingual.
The problem is that each application has a different way to translate the text. For example i have a custom button, the button has a property called KeywordText
: that means i give him a keyword for example "First.Run" and the button translates it in "This is the first time you run this Application".
In one software the text gets translated by calling Config.Translation["First.Run"];
. In the other applications its handled differently.
My question is, can i create a method in my dll that is called 'TranslateText(string text)'. And then define it in each program and not in the dll itself. For example in the 1. Application i would define it
public string TranslateText(string text){
return Config.Translation[text];
}
And in my CustomButton i would set the text like: this.Text=TranslateText(keyword);
.
The button should then call the method TranslateText() from the application the button is used in.
I hope you understand what i mean :)