If you are developing addins for Visual Studio, you should be aware that there are several localized editions (Spanish, German, French, etc.). This article provides info to take into account when locating commandbars by name in your add-in:
HOWTO: Locate commandbars in international versions of Visual Studio
2 thoughts on “MZ-Tools articles series: HOWTO Locate commandbars in international versions of Visual Studio”
Thanks for your great article.
I have the same need for a CommandBarButton, which is not of CommandBarPopup type, i.e. I could first find the “File” menu using your cast, but then I can not find a localized menu item such as “New Project”.
You can iterate the CommandBarControls of the CommandBar, and for those which are a CommandBarButton (and not a CommandBarPopup) retrieve the command behind then using:
HOWTO: Retrieve the Command that created a CommandBarControl from a Visual Studio add-in or macro
Once you have the command you can check the Command.Name, which is always in English, not localized (such as “File.NewProject” in your case)
Comments are closed.