Build a Localized Form that Speaks the User's Language
Localized Form Screen Output
Figure 2 shows the application form that displays when you run the above sample with the CurrentUICulture explicitly set to de-GR. Simply commenting out the line of code that sets the CurrentUICulture will cause the application to display the English-based form again the next time it runs.
This column demonstrated on some of the basics of creating a multilingual, or localized, application. It only touched upon setting the display value for labels and buttons. Here are a couple of additional items to ponder:
- You set display values for simple controls such as labels and buttons. How would you handle a case like the click events of one of the buttons where a message box is displayed? How do you make the message locale-specific as well?
- What if you utilize a database to drive the contents of dropdown lists and similar controls? What would be the best way to allow the contents of the dropdown list to respond appropriately?
The topic of the next column is yet to be determined. If you have something in particular that you would like to see explained here, you can reach me at email@example.com.
About the Author
Mark Strawmyer, MCSD, MCSE, MCDBA is a Senior Architect of .NET applications for large and mid-size organizations. Mark is a technology leader with Crowe Chizek in Indianapolis, Indiana. He specializes in architecture, design, and development of Microsoft-based solutions. Mark was honored to be named a Microsoft MVP for application development with C#. You can reach Mark at firstname.lastname@example.org.
Page 4 of 4