Print Page | Close Window

Command Bars Designer and software localization

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4996
Printed Date: 17 November 2024 at 6:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Command Bars Designer and software localization
Posted By: laszel
Subject: Command Bars Designer and software localization
Date Posted: 08 September 2006 at 5:33am
Hello!

I'm using Visual Studio .NET 2005 (C#)

I've created XCB file using Codejock CommandBars Designer,  in VS Designer choosed "ActiveX-LoadCommandBars(*.xcb)" and in my code: axCommandBars1.LoadDesignerBars();

Problem arises when I want to add support for another language to my application. I definitely don't want to distribute XCB files, so creating many language-depentdent XCB files and loading them by LoadDesignerBars("Form.xcb") is not a solution.

How can I solve this problem?

Of course I can map strings in code, after doing LoadDesignerBars, by
axCommandBars1.FindControl(ID_FILE).Caption = "Plik";
but aren't there any better solutions?




Replies:
Posted By: Oleg
Date Posted: 08 September 2006 at 9:30am
Hi,
In 10.3.0 was added actions. It is best solution.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: laszel
Date Posted: 11 September 2006 at 5:39am
Do Actions work with Designer generated CommandBars?

This works OK:
const int ID_FILE = 1020;
axCommandBars1.EnableActions();
axCommandBars1.ActiveMenuBar.Controls.Add(
    XTPControlType.xtpControlButtonPopup,
    ID_FILE,
    "File", null, null);
axCommandBars1.Actions[ID_FILE].Caption = "Localized String";

But this not:
const int ID_FILE = 1020; // as defined in Codejock Designer
axCommandBars1.EnableActions();
axCommandBars1.LoadDesignerBars();
axCommandBars1.Actions[ID_FILE].Caption = "Localized String";

It still displays string typed in Codejock CommandBars Designer instead of "Localized String" :-/

Any help?


Posted By: Oleg
Date Posted: 11 September 2006 at 8:39am
Hello,
Yes, it have work.
 
Just check that you enable actions inside designer. - Run designer, select any item and click Enable Actions in Property Grid.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: laszel
Date Posted: 12 September 2006 at 3:59am
Thanks, it works :)

I haven't noticed this option :)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net