Q&A

Q1:Is it possible to have multiple forms with multiple locales running in the same Windows Forms application?
A1: Yes, that's 100% possible. Because the running thread defines the CurrentUICulture, you can create a new thread in your application to display another locale. The following pseudo-code does just that:
Sub Main()
   Dim t1 as new Thread(AddressOf DoLocale1)
   Dim t2 as new Thread(AddressOf DoLocale2)
End Sub

Sub DoLocale1()
   t1.CurrentUICulture = New CultureInfo(ìes-ESî)
End Sub

Sub DoLocale2()
   t2.CurrentUICulture = New CultureInfo(ìtt-RUî)
End Sub

In the code for the individual threads, you could create a new ResourceManager instance to retrieve the culture specific resources from the XML-based resource assembly file.

Q2:This stuff seems easy enough. Is there anything you aren't telling me?
A2: Not really. The only thing left to study is how to write language-neutral code for things such as sorting and string comparisons. Each language is very different in those respects. If you need to do only a basic display of data, and make sure that the formatting is correct, you can use today's lesson chapter as your tutor. If your needs are greater than that, the Framework SDK has a huge amount of information about globalization.

If you do a search for globalization or CultureInfo or System.Globalization, you'll find everything that you'll ever need to know about globalization in .NET.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.43.26