Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Detect the language setting of any browser

Posted on 2008-10-23
2
Medium Priority
?
722 Views
Last Modified: 2013-11-08
Need a .net vbscript code to run on the homepage of a site that will detect the langauge setting of the browser and and redirect user to appropriate language landing page of the site; something like If language= en-gb then send user to page index_en.aspx . There are 5 langauges- french, german, spanish, dutch and english
0
Comment
Question by:BoydRingrose
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Expert Comment

by:Ajay Sharma
ID: 22794737
0
 

Accepted Solution

by:
BoydRingrose earned 0 total points
ID: 22795461
On doing some more searching i have now find the solution for getting the browser language is as per code attached. Thanks for your help though .
<%
Dim userLang() As String
 Dim count As Integer
 
 userLang = Request.UserLanguages
 For count = 0 To userLang.GetUpperBound(0)
    Response.Write("User Language: " & Cstr(userLang(count)) & "<br>")
 Next count
%>

Open in new window

0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question