posted on Thursday, February 26, 2004 7:21 PM
by
warstar
Give me more languages
Muhaha my first info post.
Ok so I wanted a multiple language page and that in a fast way so I’m using a “Assembly Resource File”.
Just make a default something named “language.resx” put your info in it then make a copy of it and name it “language.nl.resx” to make a Dutch language file.
Now make a Web Form and add the following code to the Page_Load
//Load the language file
ResourceManager ResourceManager1 = new ResourceManager("buur.language", System.Reflection.Assembly.GetExecutingAssembly());
//Set dutch a the default language
System.Globalization.CultureInfo Culture = new System.Globalization.CultureInfo("nl");
//
//or get the language that the users computer uses or if that file dus not exist use the default file(“language.resx”)
//System.Globalization.CultureInfo Culture = //System.Threading.Thread.CurrentThread.CurrentUICulture;
//
//Get the value A Key and get it from the Culture filled in
Label1.Text = ResourceManager1.GetString("A Key", Culture);
This is pritty easy but I want it in a dataset because the resx files are dataset’s but I don’t have a idea on how to do that any idea’s ?