How to Detect a User’s Language Settings

User language settings can be detected in one of the two following ways:

  1. Using the cultureinfo class current culture property:
    <% Response.write(Thread.CurrentThread.CurrentCulture.name) %>
  2. Using the request object’s userlanguages collection:
    <%Response.Write(Request.UserLanguages(0))%>

Note: The UserLanguages collection can be traversed for the entire list.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: