Multiple languages in Delphi

This section is for programmers. Please use it for all discussons on interfacing help with your applications and related subjects.

Moderators: Alexander Halser, Michael Schwarzl

Post Reply
Jeremy Knowles
Posts: 11
Joined: Tue Jun 03, 2008 11:13 am

Multiple languages in Delphi

Unread post by Jeremy Knowles »

I've created a variety of language help files for an application, but am having trouble in Delphi to get them to switch at runtime.

I just created (with XE3 - though I've tried it in XE2 and XE with the same result) a test project, added HTMLHelpViewer, and have two buttons, one setting the location of an English help file, the other a French one (Application.HelpFile:=xx), then call Application.HelpShowTableOfContents;

Which ever one I open first is the only one that will show. It seems that even though Application.HelpFile is changing correctly, when you open the help file, only the first one the user opened will show.

This is making it impossible to show the right help file when a user switches languages.

If anyone can offer a suggestion as to what I'm missing, I would be most grateful.

Thanks
Jeremy Knowles
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Multiple languages in Delphi

Unread post by Alexander Halser »

Strange... I never came across such a thing in Delphi. The HTML Help viewer does certainly not cache anything. So it must be Delphi, that is creating the problem. What if you set Application.Helpfile, then check it again to see if it was changed properly?
Alexander Halser
Senior Software Architect, EC Software GmbH
Jeremy Knowles
Posts: 11
Joined: Tue Jun 03, 2008 11:13 am

Re: Multiple languages in Delphi

Unread post by Jeremy Knowles »

It is definitely changed, according to the debugger, it just opens the original one. I made a small test to see if it was me or not. Any chance you can have a look (I know it's not really a S&M issue)
Jeremy Knowles
Posts: 11
Joined: Tue Jun 03, 2008 11:13 am

Re: Multiple languages in Delphi

Unread post by Jeremy Knowles »

It's OK, I've just realised what it was (in creating a basic example). I had my help files all with the same name, but in different folders, i.e.

application.exe
help.chm
/spanish
help.chm

It seems that although Delphi sets the path to the new one, it doesn't bother opening the new one if it has the same name. If I put them all in the same folder and just rename them, for example help_spanish.chm then it works fine.

Jeremy
Post Reply