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

How to change the print dialog box language ?

edited January 2015 in General
Hi (and happy new year),

I have a question/problem.
I'm French(that's not the problem ^^)...and my delphi is in French...so
is my software...
But my customers are English...and when they want to print a report, the
windows print dialog box is in french.

Is it possible/how to set this language depending on my customers (some
are french, others are english...)

Many many thanks in advance,
Laurent.

Comments

  • edited January 2015
    Hi Laurent,

    The current translated language can be controlled using the
    Report.LanguageID property.

    When installing ReportBuilder, you have the option to install a number
    of built-in languages including French and English. My guess is that
    you selected "French" as your default language which copied the French
    resource language files to your library path and thus translates all
    captions in ReportBuilder to French.

    If you also selected to install any other languages such as English,
    these language dll files would have been copied into your
    \RBuilder\Languages\... directory under their respective directories.
    For English, the following dll files are present.

    rbPrint.eng
    rbIDE.eng
    rbDADE.eng - depending on the version of RB
    rbRAP.eng - depending on the version of RB

    If you copy these files into your application directory (or the {WINSYS}
    directory), you can then use the Report.LanguageID property to change
    the current language at runtime. These files will need to be deployed
    with your application in order to function on other computers as well.

    I suggest reading over the ReadMe.doc file located in the
    \RBuilder\Languages\... directory as well as the following article which
    also gives more information about how language translations work in
    ReportBuilder. There is also an extensive section in the Developer's
    Guide about this topic.

    http://www.digital-metaphors.com/rbWiki/General/International_Support/Custom_Languages

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2015
    Well...first of all, thank you very much for your prompt answer.
    But in fact, my problem seems to be how the printdialog is called from
    my rpReport...
    My problem is the windows system (when I click on the top left button of
    my rpReport) that is not in the right language...

    For instance : in a new project, I added a TPrintDialog called MyPrint
    And then, on a buttonclick, just a "MyPrint.Execute"
    => on a french OS : it's ok, the printer dialog is in french
    => on an english OS : it's ok, the printer dialog is in english

    => but using RB, I can't have this...it's always in french...

    In my \RBuilder\Languages\... directory, I have theh foloowing :
    - cst
    - eng
    - Esp
    - Fra

    Could you help me ?

    Thx.

    Le 26/01/2015 17:03, Nico Cizik (Digital Metaphors) a écrit :
  • edited January 2015
    Hi Laurent,

    If you would like your application to automatically detect the regional
    language of the OS, you could use the utility routine
    ppGetSystemDefaultLanguage located in the ppUtils.pas unit to first
    determine the default language, then alter the LanguageID property based
    on that value. Something like the following:

    uses
    ppUtils, ppTypes;

    ...

    case ppGetSystemDefaultLanguage of
    lgSpanish: ppReport1.LanguageID := ltSpanish; //'Spanish (Spain)'
    lgEnglish: ppReport1.LanguageID := ltEnglish; //'English (United
    States)'
    else
    ppReport1.LanguageID := ltFrench; //'French (France)'
    end;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2015
    Many many thanks Nico : I owe you one !! ;-)
    It's ok now.

    Just a detail : I copied "rbPrint.eng" into system32 directory
    => it works fine...but I'd like to know if it's the really only good
    thing to do as I want to take into account French & English ?

    In your previous anwer, you talked about these files :
    - rbPrint.eng
    - rbIDE.eng
    - rbDADE.eng - depending on the version of RB
    - rbRAP.eng - depending on the version of RB

    But It seems only rbPrint.eng is needed to be copied...

    Thank you again.
    Laurent.

    Le 26/01/2015 18:11, Nico Cizik (Digital Metaphors) a écrit :
  • edited January 2015
    Hi Laurent,

    rbPrint.xxx contains all the print/preview related resource strings.
    This is all you will need unless you are using some of the end-user
    reporting features of ReportBuilder such as the runtime designer, DADE,
    or RAP.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2015
    Thank you very very much !!

    Have a nice day.

    Laurent.

    Le 27/01/2015 16:01, Nico Cizik (Digital Metaphors) a écrit :
This discussion has been closed.