views:

39

answers:

1

Is there ASP code which can retrieve the users current language? In javascript I know this works...

if (navigator.appName == 'Netscape')
  var language = navigator.language;
else
  var language = navigator.userLanguage;

But is there an equivalent for ASP/VBScript?

+3  A: 

Probably you need this: Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

Cristian Boariu
Yep. This may consist of multiple values, eg "da-DK,en-UK", so be careful to parse it accordingly.
Sune Rievers
Yeh there are multiple values for how I'm working with things but this will do it. Thanks all.
Rob Segal