How to get CultureInfo from a client machine?

so this is a question for $ 1 million.

First of all, I am developing a web application in Visual WebGui. These are mostly Winforms, but the application is converted to an HTML5 and vualΓ‘ web application ... Anyway, I have a problem with DateTime formats. By default, this is CultureInfo from the server.

I can override this in the web.config file as follows:

<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="de-DE" uiCulture="de-DE"/> 

Each date format will be German on each client computer. I want to create a web application that displays the Datetime format, for example, on the client machine in the control panel.

Is it possible? I just can't find a solution.

Thanks for the help,

+4
source share
2 answers

Try the following:

 Thread.CurrentThread.CurrentCulture = new CultureInfo(Request.UserLanguages[1]); 

Check out this link, for example Multilingual Application

+4
source

You can set the attributes of the food production and culture of the globalization tag to automatic. This will allow you to allow the server to select the user's language in accordance with its browser settings, and everything will happen automatically if you use localized resources.

0
source

All Articles