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

What are the improvements made in cas in .net 4.0, What are the improvement...

What are the improvements made in CAS in .NET 4.0? The CAS mechanism in .NET is used to control and configure the ability of managed code. Previously, as this policy was applic

What are the different visual basic features, What are the different Visual...

What are the different Visual Basic features that support LINQ? Visual Basic includes the following features that support LINQ: Anonymous types - Enables you to make a ne

Types of compatibility in vb6, What are types of compatibility in VB6 T...

What are types of compatibility in VB6 There are three possible project compatibility settings: No Compatibility Project Compatibility Binary Compatibility

A crm based on .net and oracle as backend, A CRM based on .net and Oracle a...

A CRM based on .net and Oracle as backend with import data, Transaction Reporting and management Capabilities Project Description: 1. Introduction ADA recovery Branch gets

Uml, What is UML? The Unified Modeling Language (UML) is a graphical la...

What is UML? The Unified Modeling Language (UML) is a graphical language for documenting, specifying, visualizing,  constructing, and  the artifacts of a software-intensive sys

Static chart diagrams, Describe all elements in Static Chart diagrams. ...

Describe all elements in Static Chart diagrams. Package: - The Package logically groups element of a UML model. Class: - The Class describes all set of objects with

What is an il, What is an IL? Intermediate Language is also called as M...

What is an IL? Intermediate Language is also called as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. IL

Use of hidden frames to cache client data, How can you use Hidden frames to...

How can you use Hidden frames to cache client data? This technique is implemented by developing a Hidden frame in page which will have your data to be cached. T cols="100

Explain the concept of destructor, Explain the concept of destructor? A...

Explain the concept of destructor? A destructor is a special method for a class and is requested automatically when an object is finally destroyed. The name of the destructor i

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