Jump to content

CTorres

Members
  • Content Count

    2
  • Joined

  • Last visited

Everything posted by CTorres

  1. CTorres

    ANN: Better Translation Manager released

    Thank you very much for your help, Anders. Indeed, the problem is that it loaded both modules but it cached the first one, the one of the original language, and from there it ignored the one of the selected language. I have solved it with the call to SysUtils.ResStringCleanupCache, thank you very much (updating the instance of the loaded module was already done before, but of course, with the resourcestrings already cached it had no effect). Best regards and thanks for your time!
  2. CTorres

    ANN: Better Translation Manager released

    Hi, First of all I wanted to thank Anders Melander for his application and for sharing it with the whole developer community. I am posting here because I have encountered a problem when dynamically loading the language libraries generated with BTM in projects developed with newer versions of Delphi, and I was hoping someone could help me. I've been using BTM for quite some time now and I developed the software under Delphi XE, here I have never had any problems. Things changed when I recently upgraded to more modern versions of Delphi (Delphi 11 and 12) and, after updating the corresponding BTM projects and generating the languages normally, when I changed at run time the language of my applications, the texts that come from resourcestrings were no longer translated. All the DFM controls appear perfectly translated in the language I have selected within the application, but in those points where the text is defined dynamically from a resourcestring, they are always shown in the original language in which I defined them. I load the language libraries with the reinit.pas unit and its LoadNewResourceModule, and I've never had any problem before with older versions of Delphi. Does anyone know why it treats differently the DFM texts (which it shows perfectly translated) and the resourcestrings (which it doesn't translate at all) and what I could do to fix it? Any help will be appreciated. Thanks! ------------- EDIT ------------- It always happens the same, after spending days trying to solve a problem without success, as soon as I ask for help I find the solution right under my nose. I found this post (I don't know how I missed it earlier) on this very forum: It describes my same problem and gives a solution by calling ResStringCleanupCache before loading the language library. I have tried it and now everything works perfectly. Thanks anyway and sorry for the inconvenience.
×