K
kaanengin
Hi,
I am building a multilanguage asp .net application using masterpages.
All the pages are derived from one class and the class has a function
which finds a specific label on the masterpage and prints the output
messages there.
public void ShowMessage(string outputMessage)
{
Label lblOutput = (Label)Master.FindControl("lblMessage");
lblOutput.Text = outputMessage;
}
i have a string constants class and the strings with two languages are
definded there like this
public struct InHouseMessages
{
public const string OPERATION_SUCCESS = "yehu";
public const string OPERATION_SUCCESS_ENG = "yeah";
public const string OPERATION_FAILURE = "nayir";
public const string OPERATION_FAILURE_ENG = "damn";
public const string OPERATION_STUCK = "hayiiiiiiirrr";
public const string OPERATION_STUCK_ENG = "noooooooo";
}
What i want to do is make the ShowMessage function language aware like
this
public void ShowMessage(string outputMessage, bool isENG)
{
if(isENG)
lblMessage.text = outputMessage+_ENG;
else
lblMessage.text = outputMessage;
}
i mean i want to programmatically change the variable name befoure the
variable gets its string value.
I am building a multilanguage asp .net application using masterpages.
All the pages are derived from one class and the class has a function
which finds a specific label on the masterpage and prints the output
messages there.
public void ShowMessage(string outputMessage)
{
Label lblOutput = (Label)Master.FindControl("lblMessage");
lblOutput.Text = outputMessage;
}
i have a string constants class and the strings with two languages are
definded there like this
public struct InHouseMessages
{
public const string OPERATION_SUCCESS = "yehu";
public const string OPERATION_SUCCESS_ENG = "yeah";
public const string OPERATION_FAILURE = "nayir";
public const string OPERATION_FAILURE_ENG = "damn";
public const string OPERATION_STUCK = "hayiiiiiiirrr";
public const string OPERATION_STUCK_ENG = "noooooooo";
}
What i want to do is make the ShowMessage function language aware like
this
public void ShowMessage(string outputMessage, bool isENG)
{
if(isENG)
lblMessage.text = outputMessage+_ENG;
else
lblMessage.text = outputMessage;
}
i mean i want to programmatically change the variable name befoure the
variable gets its string value.