Use of culture auto, DOT NET Programming

Assignment Help:

How can we use Culture Auto in project?

We will make a very simple login screen which we will try to use for English as well as the Greek.

The login screen will display English settings when an English user logs in and the Greek Settings when a Greek user logs in. So below are the some steps to start with.

883_Culture auto.png

Figure: - Culture Auto in action

In the figure above you can view the login page  i.e. the "LoginScreen.aspx". It is a simple page with 2 labels and 2 text boxes. The labels values i.e. the "User ID" and "Password" should be changed according to the regional settings set on the browser. So below are some of the steps for the same:-

1) Make 2 resource files as shown below one for Greece and other for the English. There are 3 values defined for "Userid", "Password" and the main title of the page. The One important thing to note is the naming convention of the files. You require tagging the naming convention with the language code. You can see from the figure below that the resource files naming convention is divided into 3 parts viz. Language code; File name & resource file extension. In the sample we will explain for the English & Greek language so I tagged the file with the "el" language code.

2360_Culture auto1.png

Figure: - Resource file naming conventions

Below are the 2 resource files defined :

401_Culture auto2.png

Figure: - Greek and English resource files

2) Once you have defined your resource files we require to define two attributes "UICulture=Auto" & "Culture=Auto". See the figure above "Culture Auto in Action".

3) The Final step you also require to define the resource key at the UI object level. You can see a sample of the similar in the figure "Culture Auto in Action".

1048_Culture auto3.png

Figure: - Login screen according to settings

Compile the project, run and see the output after changing the regional settings for both the languages. You must see different outputs as shown in the figure above. Without a single line of code everything works.... That is the magic of the "UICulture=Auto" attribute.


Related Discussions:- Use of culture auto

How i increment my new file if the file is already present, I have the pro...

I have the project that takes screen shots and saves in the specific folder.(eg.Screen0001) but the problem is that if i close application and run it again then it replace the exis

Online portal for hotel n holidays, Project Description: It is online po...

Project Description: It is online portal for hotel n packages sales. The project requires to be built on sql, Jquery and c#. The project should be submitted with all coding a

C# api to grab option price from cboe web site, C# API to grab option price...

C# API to grab option price from CBOE web site Project Description: On the web page below, user will download option prices of Stock or Index. For example, if you put "VXX" i

Configure webgarden, How do we configure "WebGarden"? The process model...

How do we configure "WebGarden"? The process model configured the "Web garden" settings in the "machine.config" or in the "Web.config" file. The configuration section is named

Can we run dot.net in unix platform, Can we run DOT.NET in UNIX platform? ...

Can we run DOT.NET in UNIX platform? One of the drawbacks of using Visual Studio.NET and the .NET framework to develop applications has been the lack of cross-platform support.

Use a checkbox in a datagrid, How to use a checkbox in a datagrid? The ...

How to use a checkbox in a datagrid? The steps to be done are as follows:- 1)    In the ASPX page you have to add Itemtemplate tag in datagrid. 2) I

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

Setup project with database, i am working on an project and my client needs...

i am working on an project and my client needs it in 2 days.project is ready but don''t know how to make setup project including local sql database(.mdf) included in setup..

I want to develop a windows 8.1 application, I want to develop a Windows 8....

I want to develop a Windows 8.1 Application Project Description: Media Player App Development for Windows 8.1 platform with brilliant UI, flexible controls and easy to use.

Checking for validity of an expression - c# program, Checking for validity ...

Checking for validity of an expression - C# Program Hello can you please provide me some examples regarding to the Checking for validity of an   expression in C#.

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