New Blog Post: PDF/A and Metadata

Report language change not honoured when setting in code

edited October 2016 in End User
Hi,

We are moving from Delphi 2007 (RB 15.02) to Berlin (RB 17.03).
We have the following code to decide which language to use (repDummy
is a tppReport)


repDummy.Language :=
TppLanguageType(GetEnumValue(TypeInfo(TppLanguageType),
PSPGetLanguageManagerSingleton().CurrentLanguage.RBLanguage));

after this the repDummy.Language is always lgCustom

to check this I changed it to
repDummy.Language := lgDutch;

And after this the repDummy.Language is still lgCustom


any ideas why this happens

regards
Paul

Comments

  • edited October 2016
    Hi Paul,

    The Report.Language property is deprecated and has been replaced with
    the LanguageID property. The Language property is retained for backward
    compatibility but should not be used for new development.

    Report.LanguageID := 'Dutch (Netherlands)';

    See the help topic for LanguageID for more information as well as the
    following article on how the new language architecture works.

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


    The above being said, your code should still function as it did with RB
    15.02. My guess is that you either do not have the Dutch language
    .dll's installed or you are loading a template after changing the report
    language.

    During installation, if you selected to install the Dutch language
    files, the proper .dll files are installed into your directory.

    rbPrint.nld
    rbIDE.nld
    rbDADE.nld
    rbRAP.nld

    Check to be sure these files are present and that for a deployed
    application they are either in the .exe directory or

    Also if you are loading templates, you need to be sure to assign the
    language after the template is loaded.

    Best Regards,

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