I have to make a multi-lingual desktop application in C# 3.5. I know how to add multilingual text for labels at design time.
But I am unable to find how to make Messagebox and Confirm dialogs multilingual? Do I have to add if/else conditions in code to check the selected language?
Thanks in anticipation!
You should use Resources. (Can be found at Project -> Properties… -> Resources tab)
If you use Resources tab then VisualStudio will create
Resources.resxfile inPropertiesfolder for you where you can store different type of resources. (e.g. Images, Audio and Strings)You can add any localizable strings there and use them later like
Properties.Resources.MyMessageBoxTitle.Later when you want to add a support for another language you can copy that
Resources.resxfile and rename it to something likeResources.it-it.resx(orResources.fr.resx). Resource manager then will automatically load the string from a corresponding resource file. (based onThread.CurrentUICulture)