I have created to .resx files: Translate.English.resx and Translate.Romanian.resx that contain strings like this:
MainWindowTitle : English Value
and in the Romanian file:
MainWindowTitle : Valoarea in Romana.
Now my question is: how tcan I force the program to interpret the the code like here:
- I have a
stringcalledlang, firstly equal withen. - I have
MainWindow.Text = Translate.English.MainWindowTitle Now I want it to be simpler to implement, so beside:
switch(lang){ case "ro": MainWindow.Text = Translate.English.MainWindowTitle; break; case "en": MainWindow.Text = Translate.Romanian.MainWindowTitle; break; }
So, beside that, I want it to be something like:
lang = "ro";
MainWindow.Text = Translate.(lang value).MainWindowText
How can I do this?