0

Our App will be translated by an external service/person, so I'm using WinRes.exe (Windows Resource Localization Editor) as a stand-alone localization editor for each Form.

Much of it works fine, including my UserControls and overridden custom TabControl, but the MenuStrip and DataGridView are blank. When I click on them or select them in the Controls dropdown, it lists a bunch of properties, but only about half of what is visible in VisualStudio's Designer.

Most importantly, the MenuStrip has no menu items, and the DataGridView has no columns (both of which need to be translated). At the bottom of the Properties pane, with the MenuStrip selected, there is clickable text "Edit Items..." and when I click it, the "Items Collection Editor" is opened, but after adding items I click "OK", but then an error occurs "Object reference hot set to an instance of an object". Similar thing happens with trying to add columns to the DataGridView.

I'm not setting these things (columns and menu items) programmatically, so I don't understand why the VS Designer can edit them but WinRes.exe can't.

Any idea how fix this?

Thank you!

XKCD137
  • 357
  • 4
  • 14
  • This is a well-known restriction in Winres, the .resx file doesn't contain enough information to reliably associate the entries for the DVG columns and the menu entries back to the original control. The resources.ApplyResources() method calls in InitializeComponent() for these items is separate. This is not going to slow down your localization service if they know what they're doing. – Hans Passant Mar 12 '14 at 20:28
  • Good morning Hans. Unfortunately, our "localization service" is going to be one of our sales guys in each country (upper management decision, against my protest). Can you offer any advice on how to localize the menu and DGV without sending source code to the translator? – XKCD137 Mar 13 '14 at 12:58
  • Hmya, don't send source code to a sales person. Tell them how to use Winres and then make another pass through the .xml file with a text editor (Notepad is fine) to directly edit the ones that Winres doesn't show. I guess. – Hans Passant Mar 13 '14 at 13:45
  • So, with a professional localization service, do you send them the source code and they edit it in Visual Studio? Or how do they deal with this WinRes restriction? - Thanks! – XKCD137 Mar 13 '14 at 14:17
  • No, they'll use the .resx file. They don't use WinRes, a tool like Passolo is common. A good service has a QA dept that runs your installer after you've integrated the updated .resx file into your project and double-checks that everything is hunky-dory. – Hans Passant Mar 13 '14 at 14:29

0 Answers0