That code:
if (MessageBox.Show(message.messageSettingChangeLanguage(), "",
MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2,
message.messageBoxAlign()) == DialogResult.Yes)
{
Properties.Settings.Default.languages = language;
Properties.Settings.Default.Save();
Application.Restart();
}
Doesn't change the value of
language
, it just saves the current value. You should be toggling
language
between "Farsi" and "English" before you store it - or better still using an
enum
instead of a string so that you can only store known languages. A string allows for spelling mistakes when you use it.
I have no idea why this appears to work in dev - I suspect you are looking at old code or an old EXE file.