Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Design time localization for custom controls
 

Design time localization for custom controls

Hello,

I am developing a custom .NET control and I have associated custom editors and dialogs for the different properties of the custom control.

I am localizing these custom editors and dialogs. These dialogs can be launched from the Property Grid or Smart Tags in Visual Studio. I wanted to know whether I need a localized version of Visual Studio to see the localized strings in the custom editors and dialogs?

Here is my configuration:

OS - Win XP Pro - Localized (Eg: Japanese)
VS - 2005 - Not Localized (En - US version)

Now in such a scenario, if I launch the dialogs at Design time in Visual Studio, I see english strings and not the localized ones. Does this mean that I need a Localized version of VS (Eg: Japanese VS) to see the localized strings in the local language of the OS?

Instead of design time, if I launch the dialog at run-time from a Property Grid control (which is bound to the property of my custom control with the custom editor), the strings in the editor dialog are localized.

My understanding is this:

Since I am having an english version of VS, the process sets the locale and culture to en-US when it starts, and hence all strings are in English. Where as the simple app that I created (with the control and the property-grid) starts of with a Japanese locale and hence the editor dialog launched from that process has localized strings.

Please validate this, else point me to the correct thing.

PS: I have tried the Tools->Options->Environment->International Settings -> Same as MS-Windows setting. This also did not change the english strings to localized strings even after restarting the VS environment.

Srirang  Wednesday, January 16, 2008 12:17 PM
Hi, may be you don't need this answer anymore, I still hope the other people can see this answer, which is not perfect though:( >>Your problem: The control is not localized at design time. >>Solution: 1. well, you can change the language for your control to the expected language(e.g.: Japanese). 2. [The important step] Set the "Localizable" property of your control to "False". 3. Now rebuild the project, you can see the changes:) Don't forget to set the "Localizable" back to True, otherwise your control will always be Japanese in Runtime. Issues: 1. if you compile the control into a dll, and send it to others, this solution won't work. 2. how to dynamically change the locale without such a change, I'm not sure... >Roky
  • Proposed As Answer byrokyWang Monday, June 22, 2009 8:03 AM
  •  
rokyWang  Monday, June 22, 2009 8:03 AM

You can use google to search for other answers

Custom Search

More Threads

• Sharing images
• Get the designer for a control
• Adding a dataset to DesignerHost
• Editable Panel within UserControl
• Creating Tree View in Datagrid in VB.Net 2005?
• Tooltip gone mad!
• Nested Forms, better button graphic, layout???
• Switching between snap modes.
• Problem with MS Web Browers control
• Custom Property Editor Woes