asp.net.ph

Request.UserLanguages Property

System.Web Namespace   HttpRequest Class


Gets a sorted string array of client language preferences.

[ VB ]
Public ReadOnly Property UserLanguages As String ( ) 

[ C# ]
public string [ ] UserLanguages {get;}

[ C++ ]
public: __property String* get_UserLanguages ( );

[ JScript ]
public function get UserLanguages ( ) : String [ ];

Property Value

A sorted string array of client language preferences.

Example

The following example captures the value ( s ) returned by the UserLanguages property into a string array then writes each individual user language name to a separate line of HTTP output.

<script language="C#" runat="server">
string html;

void Page_Load ( ) {
   int i;
   String [ ] arr = Request.UserLanguages;
  for ( i = 0; i < arr.Length; i++ ) {
      html += "User Language " + i + ": " + arr [ i ] + "<br>";
  }
}
</script>
  C# VB

 Show me 

See Also

HttpRequest Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 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 asp.net.ph