Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Translation of my own Printdialog to German

edited February 2012 in General

Hi,

we have created our own derivation of the TppPRintDialog, adding a button
to set the text-export settings in the Print to file portion of the dialog.
All this works fine, until our german customer opened the dialog in his german
version of our application, and then he complained the print dialog showed
in english and not i german like the rest of the application (including reportbuilder
parts).

How can i correct this problem? Most of the components on our own printdialog
are just equal to the TppPrintDialog our dialog is inherited from...

gr
Bas

Comments

  • edited February 2012
    Hi Bas,

    Did you copy the existing print dialog before adding the custom items?
    If so, you need to be sure you have implemented the LanguageChanged
    routine and that it's called when the language has been changed. All
    text inside the dialog should not be hard coded, the strings are loaded
    from the language resource files using the ppLoadStr routine.

    Are you able to recreate this if you change the language to German on
    your machine?

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2012
    Hello Nico,

    Thanks for you answer.

    I created the new dialog as a new class derived from TppPritnDialog

    TfrmRBPrintDialog = class(TppPrintDialog)
    btnPrinttextSetup: TButton;
    procedure btnPrinttextSetupClick(Sender: TObject);
    procedure lblPrintToFileClick(Sender: TObject);
    procedure cbxPrintToFileClick(Sender: TObject);
    protected
    public
    procedure Activate; override;
    end;

    I assume that TppPrintDialog.LanguageChanged is still called ...

    I find it odd that the original components (unchanged, declared in TppPrintDialog)
    are not translated ..


    gr
    Bas
  • edited February 2012
    Hi Bas,

    If you temporarily remove your custom print dialog from the project and
    use the built-in one, is the translation correct? If, when using your
    custom dialog, you place a break point inside the LanguageChanged
    routine, is it called when you change the language?

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.