I'm creating a multilingual application using Windows Forms. I have created my multilingual content by marking forms as localizable and switching Language to something other then default and changing the form texts.
This works great but there is a small problem with that. On one of the forms I must set up a text to be displayed in a form constructor. And now the problem is that if I enter it in the default language it will appear in that language even if culture if switched to something else.
I would like to know what's the easiest or most effective way of localizing such string.
Just an example of what kind of message I need to localize:
class MyForm : Form
{
public MyForm()
{
if (myAdapter.ConnectionStatus == ConnectionStatus.OK)
{
statusLabel.Text = "Connected";
}
else
{
statusLabel.Text = "Not connected";
}
}
}
In this example I would like to have "Connected" and "Not connected" localized based on a current culture info.