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

Shadowing, What is shadowing? When 2 elements in a program have similar...

What is shadowing? When 2 elements in a program have similar name, one of them can hide and shadow the one. Therefore in such cases the element which shadowed the main element

Object pooling in .net, How object pooling in .NET is done COM+ reduces...

How object pooling in .NET is done COM+ reduces overhead by creating object from scratch. Thus  in COM+ when object is activated its activated from pool and when its deactivate

Explain the wsdl, Explain the WSDL. WSDL is a short form for Web Servi...

Explain the WSDL. WSDL is a short form for Web Services Description Language, which is used to explain a Web service in terms of the messages that it forms and accepts. The WS

Steps of acquiring a proxy object in webservice, What are the  steps of a...

What are the  steps of acquiring a proxy object in Webservice? The following steps are required to get a proxy object of a webservice at the client side:- 1.     The Clie

Explain what user controls and server controls, Briefly explain what user c...

Briefly explain what user controls are and what server controls are and the differences among the two.   An ASP.NET control (sometimes known as a server control) is a server-si

Flexible in rapidly moving from project to project, This is a whole time co...

This is a whole time contractual role working for a sports advisory service. We are data insights consultancy specializing in sports. We consult to a number of sporting organizatio

What are assemblies, What are Assemblies? Assembly is a single deployab...

What are Assemblies? Assembly is a single deployable unit that have information about the implementation of classes, structures and interfaces. It also keeps the information ab

Webpage builder windows application, Webpage builder windows application + ...

Webpage builder windows application + source code + installer + user friendly interface. Project Description: Website Builder As its name suggests, the site builder should

Need experienced outlook developer, Need Experienced Outlook (Microsoft Off...

Need Experienced Outlook (Microsoft Office) developer Your required skills: (1) A developer at heart, one that knows how to prepare modular, well-designed and clean code, (2) va

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