Blogs

News

Favorite Posts

ctodx

Discussions, news and rants from the CTO of Developer Express, Julian M Bucknall

VCL subscription: new localization tool coming in next build

     

clip_image001 We've been working on a new tool for native Delphi and C++Builder developers and will release it in the next build (build 40). It's known, catchily, as the TcxLocalizer component. Oh, and it's free with the subscription.

WAY COOL UPDATE: I totally misinterpreted the information I was given. Apparently TcxLocalizer is going to be shipped with the "Express Cross Platform Library" which is included as part of all our active latest products. So you don't need the subscription, you'll, well, just get it anyway, provided you're up to date. And a little birdie tells me that Build 40 is on target for release next week. With that, back to your normal programme...

The TcxLocalizer component helps you localize those of your applications that use our controls, as well as third-party or standard controls. This component provides centralized control over an application’s UI language or locale. Using this component, switching to another locale is as simple as changing a single option.

Here's how it works -- the brief version.

Create a resource string file using the Localizer Editor, which is a standalone application shipped with the component. You then drop the TcxLocalizer component onto a form, link the resource string file to it, and select the current locale.

clip_image003

At this point, you can just run the application and see it localized. Voilà!

Localizing Developer Express controls

With our controls, the text displayed by various UI elements is provided by resource strings. Prior to the TcxLocalizer component, you had to go and manually change resource string values with the translated text. Now, you can use the Localizer Editor to browse all the available resource strings for our controls, specify resource string values for any number of locales, and store these values to a resource strings file.

clip_image005

clip_image007

After this, the created file can be linked to the TcxLocalizer component, and at runtime, the controls will display the text based on the selected locale.

clip_image009

Localizing standard or third-party controls

Along with the configured TcxLocalizer component that you use in the application, specify the IdxLocalizerListener interface for the control to be translated (whether that is a form, frame, or custom control), and implement the IdxLocalizerListener.TranslationChanged method. In this method, perform all the necessary modifications to the UI, such as label and caption initializations, etc.

Of course, you are free to programmatically assign string constants based on the current locale specified by the TcxLocalizer component, however the Localizer Editor provides a more convenient and elegant way to accomplish this. You can define custom resource strings with unique names, store them to a resource strings file, and later retrieve them in the TranslationChanged method.

clip_image011

This way, you can control and modify all the resource strings used in your applications in a centralized manner.

The following example demonstrates how a form’s caption and some labels are localized using resource strings from a resource strings file created with the Localizer Editor.

// Delphi
// ...
uses
cxLocalization, dxCore, cxClasses, ;
type
TForm1 = class(TForm, IdxLocalizerListener)
// ...
public
procedure TranslationChanged;
end;
// ...
procedure TForm1.TranslationChanged;
begin
Caption := cxGetResourceString(@sMainFormCaption);
lblDescription.Caption := cxGetResourceString(@sDescription);
lblFileLocation.Caption := cxGetResourceString(@sFileLocation);
// ...
end;
Published Oct 31 2008, 02:49 PM by Julian Bucknall (DevExpress)
Filed under: ,
Technorati tags: localization, VCL
Bookmark and Share

Comments

 

Claudio Piffer said:

wow!!!!

very great news for the vcl market!

Thanks Julian

Best Regards

November 1, 2008 3:22 AM
 

Rich said:

The localization tool is simply amazing!

I want to buy VCL Subscription right away, but it includes all the ASP stuff I'll never use -- and I hesitate to pay full price for a component set in which over 1/2 will never be touched.

Please consider offering a VCL Subscription "Lite" that doesn't include all the ASP stuff--for less.  I think that'll sell like hotcakes at $999 - $1099.

I know I would buy it right away, instead of exploring cheaper alternatives to the $1499 full subscription, like I am now.

November 1, 2008 2:20 PM
 

Stephane Wierzbicki said:

That's great !

Looks like I will drop all my 'TcxIntlxxx' used components :)

Thank you for this !

Question : will you provide a webspace to upload or download customers translated strings ?

November 1, 2008 2:50 PM
 

Stephane Wierzbicki said:

Thank you :)

November 2, 2008 9:52 AM
 

Adam said:

Excellent, look forward to this (how about XtraReports being ported to VCL ;-)

November 2, 2008 6:02 PM
 

Byron Baynham said:

Excellent news.  Any ideas on  the delivery schedule?

November 2, 2008 8:58 PM
 

Julian Bucknall (DevExpress) said:

All: checkout the WAY COOL UPDATE above.

Cheers, Julian

November 2, 2008 11:38 PM
 

Ferruh Köroğlu said:

Rich +1,

November 3, 2008 9:41 AM
 

Laurent PIERRE said:

Wonderfull. It's a very nice feature. I hope like Stephane that DevExpress will provide a webspace to upload or download customers translated strings...

Thank you for this great news.

Laurent

November 5, 2008 4:17 AM
 

chirpy2007 said:

thank's

January 7, 2009 6:20 AM
 

kamel said:

it's wonderfull

thanks

April 5, 2009 10:51 AM

About Julian Bucknall (DevExpress)

Julian is the Chief Technology Officer at Developer Express. You can reach him directly at julianb@devexpress.com. You can also follow him on Twitter with the ID JMBucknall.
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.