Solved

Detect the language setting of any browser

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now