C# Multilanguage resx
-
Dear all. I'm a total newbie to programming (I have made som very trivial applications in C#). Right now I'm looking at multilangual programming for the Windows User Interface. Could anyone provide a really (and I mean really) simple code/application which shows how to implement multilangual controls? I have searched both Google and CodeProject, but most of the examples there are a bit too "difficult" for me to understand at this point, and most often the examples contain a lot more than just the language function. I know it has something to do with multiple resx files, but that's about it. Thanks in advance.
-
Dear all. I'm a total newbie to programming (I have made som very trivial applications in C#). Right now I'm looking at multilangual programming for the Windows User Interface. Could anyone provide a really (and I mean really) simple code/application which shows how to implement multilangual controls? I have searched both Google and CodeProject, but most of the examples there are a bit too "difficult" for me to understand at this point, and most often the examples contain a lot more than just the language function. I know it has something to do with multiple resx files, but that's about it. Thanks in advance.
The easiest way is : 1. Create Resource.resx in Visual Studio and add some text in it, for example : MyText : World 2. Then create Resource.de.resx in Visual Studio and add some text in it, for example : MyText : Welt In your source code, you can call it using : MessageBox.Show(Resource.MyText); The content of Resource.MyText is depend on your CurrentCulture. If your CurrentCulture is English, then you get "World" If your CurrentCulture is German, then you get "Welt"
-
The easiest way is : 1. Create Resource.resx in Visual Studio and add some text in it, for example : MyText : World 2. Then create Resource.de.resx in Visual Studio and add some text in it, for example : MyText : Welt In your source code, you can call it using : MessageBox.Show(Resource.MyText); The content of Resource.MyText is depend on your CurrentCulture. If your CurrentCulture is English, then you get "World" If your CurrentCulture is German, then you get "Welt"
Thank you very much!