Bingding data at runtime

jcavard

New member
Joined
Jul 26, 2005
Messages
1
Programming Experience
Beginner
Hi! I am currently designing an application that will be in french/english language. At startup, I want to load the appropriate table (tbl_english_string or tbl_fench_string) depending on the language setting, then assign the string to the controls text (e.g. menuItemFile.text = ENGLISH_STRING_FROM_TABLE). Anyone can help me with this one? I stuck, I know I miss something obvious, but I don't know what and I didn't find anything. I hope I made myself clear, thank you all!

Jean Christophe Avard
 
You can use a database if you like but VB.NET has localisation features built into it. I'd suggest you do a help search for "localization" (US spelling of course).

If you want to persevere with your current method, you can get the current language in various formats using these properties:

MessageBox.Show(System.Globalization.CultureInfo.CurrentCulture.DisplayName)
MessageBox.Show(System.Globalization.CultureInfo.CurrentCulture.EnglishName)
MessageBox.Show(System.Globalization.CultureInfo.CurrentCulture.Name)
MessageBox.Show(System.Globalization.CultureInfo.CurrentCulture.NativeName)
MessageBox.Show(System.Globalization.CultureInfo.CurrentCulture.ThreeLetterISOLanguageName)
MessageBox.Show(System.Globalization.CultureInfo.CurrentCulture.ThreeLetterWindowsLanguageName)
MessageBox.Show(System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName)
 
Back
Top