Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
 Using the CurrentUICulture Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Developer's Guide
Using the CurrentUICulture Property

The CurrentUICulture property represents current user interface culture on a per-thread basis. This property is used by the ResourceManager class to look up culture-specific resources at run time. Your application can use a neutral or specific culture, or the InvariantCulture to set the CurrentUICulture property. The application can use the CurrentThread property to set CurrentCulture.

Your application can set the CurrentUICulture property explicitly. The following code example sets the property to the neutral culture German ("de").

Visual Basic
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de")
C#
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de");

The application can also explicitly set CurrentUICulture to a specific culture. The following code example sets the property to the specific culture German (Germany), designated "de-DE".

Visual Basic
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE")
C#
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");

If the CurrentUICulture property is not set explicitly in application code, it is set by default when the application starts. This setting uses the GetUserDefaultUILanguage function on Windows 2000 and Windows XP Multilingual User Interface (MUI) products for which the user can set the UI language through the regional and language options in Control Panel. If the user does not set the UI language, the system-installed language, which is the language of the operating system resources, sets it.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker