16

I'm maintaining one program written in C# 2.0 (VS2005). It has pretty large codebase, lot of authors, it is almost internal app, but currently it is also one of our customers using it.

App is multilingual and translation of own forms and components works OK. But, there is one component - DockPanel Suite by WeifenLuo and I need to translate it to another language (zh-CN) - one of the chinese guys translated resource file to his language and now I'm trying to include and use in application, but I'm failing in it - although whole app is in chinese, this component remains in english. The untranslated resource file can be found on github: https://github.com/dockpanelsuite/dockpanelsuite/blob/master/WinFormsUI/Docking/Strings.resx

How to do that? I tried almost everything, naive approach (just resgen and compile by al, and trying to use it as satellite assembly - also tried ilmerge), then opening DockPanelSuite in VS2013 Express, adding resx as Strings.zh-CN.resx, but nothing works and tooltips and others are still in english.

Tried also stepping-in with debugger, but debugger broke at tooltip = Strings.DockPaneCaption_ToolTipAutoHide but it didn't step into getter defined in Strings.Designer.cs

I'm stuck and I don't know, how to do that. Any idea? Thanks very much!

Mike S.
  • 1,995
  • 13
  • 25
  • I do not really understand your issue entirely, but one thing I could help to explain: "it didn't step into getter" - it won't. To debug setter or getter, you need a special way. Check this: http://stackoverflow.com/questions/4408110/debugging-automatic-properties – Ian Jan 21 '16 at 12:17
  • The problem is I cannot "insert" another language resource into component (in separate DLL). It still uses english. – Mike S. Jan 21 '16 at 12:30

1 Answers1

6

I was able to translate a label in the demo application in a very simple process:

  • git clone the library
  • Copy & paste the Strings.resx file
  • Rename the copy into Strings.pt-BR.resx
  • Compile, it's done (in my case, I translated the "Close" label)

enter image description here

however, this project contains many Strings.resx files

enter image description here

Did you change all of them? Or did you just change one? (maybe a wrong one, like I did in my first try)

Eduardo Wada
  • 2,606
  • 19
  • 31
  • Hi, thanks for answer. Good point, nevertheless if I'm not wrong, every "theme" goes to separate .dll and I'm not using them. But, of course, I've tried to update every resx to see from which file strings come and they comes from the file I'm using and trying to translate (added some short id string to every "Auto hide" in resources and WinFormsUI string appeared in my application). – Mike S. Jan 22 '16 at 10:59