How to change the print dialog box language ?
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.
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.
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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 :
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;
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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 :
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Have a nice day.
Laurent.
Le 27/01/2015 16:01, Nico Cizik (Digital Metaphors) a écrit :