| |||||
Page.UICulture PropertySystem.Web.UI Namespace Page Class Gets or sets the user interface (UI) culture name for the Thread object associated with the page. [ VB ] Public Property UICulture As String [ C# ] public string UICulture { get; set; } [ C++ ] public: property String^ UICulture { String^ get ( ); void set ( String^ value ); } [ JScript ] public function get UICulture ( ) : String public function set UICulture ( value : String ) Property ValueThe user interface culture name. RemarksThe UICulture property is used to help localize page content. The UICulture value determines which localization resources are loaded for the page. The property can be set to any valid culture name. For example, the en-US culture name sets the page to American English, while the fr culture name sets the page to French. The value can also be set to auto which performs automatic detection of the browser's preferred language. The automatic language detection can be qualified with a default value such as auto:en-US. The UICulture attribute can be set in the @ Page directive in the <%@ Page Language="C#" Culture="auto" UICulture="auto" %> In addition, the value of the UICulture property can also be set programmatically string selectedLanguage = Request.Form [ "lstLanguages" ]; Culture = selectedLanguage; UICulture = selectedLanguage; or in the globalization element of the <configuration>
<system.web>
<globalization
requestEncoding = "us-ascii"
responseEncoding = "iso-8859-1"
culture = "fr-FR"
uiculture = "fr" />
</system.web>
</configuration>
ExampleThe following example illustrates how to programmatically set the UICulture property to localize page content. See AlsoPage Members Page.Culture Property Page.LCID Property |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme