Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All

Could any body tell me the simplest and efficient one to change entire developed project language into some other languages?

Means
Each and every control's data like labels,groupbox,combobox,dropdownlist,grid's,panel's,......
should be changed to other language.

Assume based on Dropdown Value(It contains all formats of different languages in login form) i want to change the language.

Regards,
Pawan.
Posted

1.You need to include System.Globalization and System.Resources namespaces.
2.Just add the resource file(In Solution Explorer Right click the project->Add New item-> Resource file) for each and every language.
3.Let us consider i want my application in english and in chinese.For that i Need to have two resource files such as Resource.resx and resource.zh-CN.resx(zh-CN is locale for Chinese Language).
4.For each and every text in ur application u need to add the corresponding Language text in the resource file.In resource file u can see three columns 1.Name(should be same in all resource file) 2.Value(Text value in the corresponding resource file language).

For OK text---
In Resource.resx,Name Field contains----->Cmd_OK(UserDefined)
Value Field contains----->Ok
In Resource-zh-CN.resx,Name Field contains----->Cmd_OK(UserDefined)
Value Field contains---------->(need to give Chinese Word for OK Text)
5.In form load event create object for culture info and ResourceManager.
In CultureInfo U have to specify the corresponding Locale as Parameter for the constructor. and For ResourceManager u have to specify Assemply.GetExecutingAssemply() as Constructor Parameter.


6. let us consider Ok is a word that appears on the button.....
den in the form load u have to specifyOkbtn.text=ResourceManagerObj.GetString(Cmd_OK,CultureInfoobj);
 
Share this answer
 
v2
Comments
Pawan Kiran 26-Jul-10 9:20am    
Reason for my vote of 4
Thanks to u for providing information.
Simply speaking, the satellite assembly would suit for you. You can google for more information.
 
Share this answer
 
Another way,you can create table for string of translation.
and Read data by DropDownList_SelectedIndexChanged even .
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900