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

Explain dataset accept changes, Explain Dataset Accept Changes and Data Ada...

Explain Dataset Accept Changes and Data Adapter Update methods?  Data Adapter Update method Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated

How is a property designated as read-only, How is a property designated as ...

How is a property designated as read-only?  In VB.NET: Public Read-Only Property Property Name  As Return Type Get ?Your Property execution goes in here End Get End Property.

Converting temperature from fahrenheit to celsius in c#, Converting tempera...

Converting temperature from Fahrenheit to Celsius - Program C# I am facing some problems in the code for Converting temperature from Fahrenheit to Celsius. Can anybody suggest

I need complete erp solution of jeweler manufacturing, I need Complete ERP ...

I need Complete ERP Solution of Jeweler Manufacturing Project Description: MY Project Have Complete ERP Solution of jewellary manufacturing Process. By Using of my software y

Develop a google map fix .net site on android, I have to develop a Google M...

I have to develop a Google Map Fix .NET Site on Android(maybe Cross Browser issue) Project Description: A developer has implemented a characteristic which involves data from

Difference between class and structure, What is the difference between Clas...

What is the difference between Class and structure's? The main differences between them are as follows:- 1) The Structure is value types while classes are referen

I want a sportsbook platform, Project Description: We want to design and...

Project Description: We want to design and develop a new Sportbook Platform from scratch, subsequent functionality: - Have a full functionality like other similar websites (S

Program of nested loop - c# program, Program of Nested Loop - C# Program ...

Program of Nested Loop - C# Program I am a learner of C# language and i am struggling with the Loops in c#. Can you have any code examples for this.

What is windows workflow foundation, What is Windows Workflow Foundation (W...

What is Windows Workflow Foundation (WF)? Windows Workflow Foundation (WF) is a technology that was first introduced in .NET Framework 3.0. WF having of a programming model, a

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