Gravatar for daman.singh@quantum.com

Question by coolgal1980, May 14, 2015 4:57 PM

How to retrieve the default browser language (code) from within a skin?

How to retrieve the default browser language (code) from within a skin?

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, May 14, 2015 5:13 PM

The skin code is run on the server side.

In .Net, you could read this information from the HTTP request headers like this:

HttpContext.Request.UserLanguages

Source: https://msdn.microsoft.com/en-us/library/system.web.httprequest.userlanguages(v=vs.110).aspx

Gravatar for daman.singh@quantum.com

Comment by coolgal1980, May 14, 2015 5:47 PM

That worked! Thanks!

Ask a question