Current culture of the environment in windows and asp.net, DOT NET Programming

Assignment Help:

How we get the current culture of the environment in windows and ASP.NET?

The "CultureInfo.CurrentCulture" represents the current culture of the environment. For illustrate if you are running Hindi it will show "hi-IN". Please note one thing in mind that "CurrentCulture" will only give you the culture on which your application is running.  If it is a windows application this will work great. But in ASP.NET 2.0 we need to know what culture the end user has.

For a real international website your different users can log in with different culture. For illustrate you can see from the given figure below different users are logging in with different regional settings. The Client browser sends the information in the request headers to the server. For illustrate a Korean user will send "KO" in the request headers to server. We can get the value by using the" Request.UserLanguages".

681_current culture.png

Figure: - Different users logging in from different countries

The Regional settings are defined on the user's browser as shown below. The Click on Tools - Internet options - Languages. You can also add languages in the language preference box. By Using "Move up" and "Move down" you may define the priority of the languages. In the figure below we have 4 languages defined with "Hindi" language set at the top priority. " The Request.UserLanguages" returns back an array of string with a sorted order defined in your language preference tab of the browser.

1598_current culture1.png

Figure: - Setting language preferences in browser

The code snippet below shows how we can display the user languages. The first figure is the code snippet which shows how to use the "Request.UserLanguages". The second figure represents the output for the same.

20_current culture2.png

Figure: - Request.UserLangauges in action

512_current culture3.png

Figure : - Output from request.Userlanguages


Related Discussions:- Current culture of the environment in windows and asp.net

A few changes to outloproject description, A few changes to OutloProject De...

A few changes to OutloProject Description: We require someone who is familiar with programming plug-in to work with Microsoft Outlook. Initially we just require a simple chan

Get the results of a google search query, Project Description: My needs ...

Project Description: My needs are simple; the application will: - Get the results of a Google search query (The title, URL, the description, time posted) - Apply definite

How do you implement server-side include directives, Question: (a) How...

Question: (a) How do you implement the following in ASP.NET: (i) Server-side Comments (ii) Server-side Include Directives. (b) (i) Give two reasons why the IsPostBack

Web portal development, Project Description: Looking for a developer who...

Project Description: Looking for a developer who will develop a web portal like zulutrade, some features will be taken from signaltrader the changes ould be like: 1) only cer

What is the difference between int and int32, What is the difference betwee...

What is the difference between int and int32. There is no difference among int and int32. System.Int32 is a .NET Class and int is an alias name for System.Int32.

Jquery and mvc project, I am looking individuals who have company experienc...

I am looking individuals who have company experience working on Jquery and Microsoft Technology ( MVC 4.5 ), who will take live online session and provide training through Team Vie

Need to get a windows desktop application developed, Need to get a windows ...

Need to get a windows desktop application developed Project Description: I am looking to obtain a desktop application developed. The desktop application will have the subsequ

Create a xslt and css file, Using the attached XML file (xml_ind.xml) creat...

Using the attached XML file (xml_ind.xml) create a XSLT and CSS file for the following information: select the following information for ONLY the cars that cost more than $50,00

How to identify that the page is postback?, How can we identify that the Pa...

How can we identify that the Page is PostBack? The Page object has the "IsPostBack" property which can be checked to know that the page is posted back.

Web-app developer for startup, Web-App Developer for Startup Project Des...

Web-App Developer for Startup Project Description: I am seeking someone who is good at building dynamic sites that will run on both desktops and tablets. The core of the w

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd