Auto Detection of System's Language by .NET 4.5

Introduction

In today's article you will learn about Auto Detection of the system's language by .NET 4.5.

Sometimes you may become bored of using the same language or the same features again and again or it may also happen that you will prefer to see applications running in your Mother Tongue. In these cases you can change your system's language and your joy will be doubled when you will see that .Net has auto-detected this change and it's also working in the same language.

Step 1

First of all go to your System's Control Panel by clicking on the Start Menu.

language1.jpg

In the Control Panel you will find an option named as "Region and Language"; click on it to continue.

language2.jpg

Step 2

Now you will see that by default English is selected in the "Format" option. Click on this option and scroll down to your desired language. I chose Hindi.

language3.jpg

After selecting the format option click on the "Keyboards and Languages" option present at the side of the Format option. Here click on "Change Keyboards".

language4.jpg

Step 3

After clicking you will find that here also English is the default option. Click on the Drop Down list and there you will find two options available for Hindi, one for the traditional Hindi and another one for the Devnagri Hindi, select any of these options available.

language5.jpg

language6.jpg

After selecting, click either on the "Apply" or "Ok" button, whichever are to be clicked. Now you must restart your system.

Step 4

When restarting is done, open Visual Studio 2012 and select either the Windows Application or the Web Application. Here I have selected the Web Application in which I will create a small form.

Add Labels, TextBox and Buttons to your form and change their text in the Property Window. Now you will see that whatever you are typing is typed in Hindi (or whatever language you selected).

language7.jpg

Without debugging also you will see that everything is written in Hindi.

language9.jpg

Step 5

Now debug your program to see one of the most interesting things. In the output window, whatever information is given by the user is also shown in Hindi.

language10.jpg

NOTE: If you had changed the language using the steps above and you have a password to access your System then don't forget to change the language before restarting or doing a shutdown of your system, otherwise you will be unable to access your own system since whatever information (password or username) is given by you will be in Hindi and it will not allow you to enter it. Now you will be thinking that at the end of the 3rd step I had aid to restart the system and here I am advising not to restart it, then don't worry, it's language will be changed only when you enter your system after restarting it.  

Up Next
    Ebook Download
    View all
    Learn
    View all