Translation of command categories

Docking/MDI for Windows Forms Forum

Posted 11 years ago by BLANC Stéphane - Staubli Robotics Suite Product Manager, STAUBLI
Version: 2.0.0099
Avatar
Hi,

It would be very useful to have another parameter in the constructor of a command
in order to translate the category of the command.
(like the command name thanks to the "text" parameter)

Sample :

public AddWatchCommand() :
base("Debug", "AddWatch", Resources.StrCommandAddWatch, -1) { ... }

Something like this will solve the problem :

BarButtonCommand(
string categoryKey,
string categoryText,
string nameKey,
string nameText,
int imageIndex);

Stéphane

Comments (4)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Or do you think it would be better to make some sort of string dictionary where you can map "Debug" to an alternate localization? If a "Debug" key isn't found in that dictionary, it will use "Debug" itself. What are your thoughts?


Actipro Software Support

Posted 11 years ago by BLANC Stéphane - Staubli Robotics Suite Product Manager, STAUBLI
Avatar
I think your solution is better :

In my solution, you have to make a call to the resource in every command
whereas in your solution you only have to update the dictionary one time.

(Further more, it becomes possible to add the translation of the categories
into the "Customize" form of the barmanager...)

Stéphane
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok, we'll try and get a BarManager.CategoryLocalization property added in the next maintenance release. We'll have the Customize dialog translate based on those.


Actipro Software Support

Posted 11 years ago by BLANC Stéphane - Staubli Robotics Suite Product Manager, STAUBLI
Avatar
ok, thank you very much

Stéphane
The latest build of this product (v2020.1 build 0400) was released 28 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.