Solved

Detect the language setting of any browser

Posted on 2008-10-23
2
706 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

840 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