Working with Cultures

In Chapter 33, “Localizing Applications,” you get more information about localizing applications, but at this particular point of the book, you can get an interesting taste using My. Two cultures are settable for your application: the thread’s culture, which is about string manipulation and formatting, and the user interface culture, which is about adapting resources to the desired culture. You can get information on both by invoking the Culture and UICulture properties from My.Application; then you can set different cultures for both the main culture and UI culture by invoking the ChangeCulture and ChangeUICulture methods. The following code demonstrates this:

Dim culture As CultureInfo = My.Application.Culture ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.