WPCubed Product Support

Translate (Localization?) of Dialogs

Hi,

How do I translate the WPDialogs? (WPParagraphDlg, WPPagePropDlg, etc..)?

I tried to look at the demo "Demos\Tasks\Localisation" but it just not compile on XE3 and the code is confusing for me.

I tried to add a TWPLanguageControl do the form, set Active = True, and put this code on the OnLoaded event:

WPLangInterface := TWPLocalizationInterface.Create(WPLanguageControl1);
WPLocalizeAllStrings;

It just don't do anything. I set the propertie GlobalLanguage to "BR" and the propertie FileName to the XML "WPTools6_BR.XML" but it still doesnt do anything.

I'm using WPTools 6.29 and Delphi XE3. What am I missing?

Also, I own this copy of the standard WPTools6, I just saw that theres already the WPTools7, how do I check for prices and new features to upgrade?

Thanks in advance!

#1 ♥ 0
6.9k Views 1 links 2 users read 2 min
support

Hi,

You need to load the XML file into WPLanguageControl1 in the property dialog (doubleclick on the component).

To upgrade please see here:
[](http://www.shareit.com/programs.html?productid=213808&cart=1&cookies=1&quickbuy=0)

Add the units WPUtil, WPActnStr to the uses clause.

To active use this code in the OnCreate event of the form:

procedure TForm1.FormCreate(Sender: TObject);
begin
  WPLangInterface := TWPLocalizationInterface.Create(WPLanguageControl1);
  WPLanguageControl1.GlobalLanguage := 'DE';
  WPLocalizeLoadForms := TRUE;
  WPTools_LoadVCLStrings;
  WPTools_LoadActionStrings;
  WPToolbar1.ShowHint := true;
end;

In the OnDestroy event add this:

procedure TForm1.FormDestroy(Sender: TObject);
begin
  WPLangInterface.Free;
end;
#2 ♥ 0

Cool, it worked!

But now it changed my default unit type from "cm" to "in" on the PagePropDlg, how do I chance it back to "cm"?

Thanks!

#3 ♥ 0
support

Hi,

the ValueEdit fields have a context menu (click right) where you select the unit.

The global, initial setting is controlled by the global variable

GlobalValueUnit: TWPEditUnit = euCm;

#4 ♥ 0
This category is archived. No new posts are possible.