Skip to main content
Known Participant
July 3, 2009
Question

TOC Auto-Sync and Custom Buttons

  • July 3, 2009
  • 1 reply
  • 2533 views

I have two CHM files.

One contains English content, the other has French content.  We're okay with having to change Windows display language to French in order to see the localized interface.  It would be great to force it to French without having to do that, but it's better than nothing.

I have a handy dandy little javascript in my master page to flip between topics in the two CHM files.  This is where my problems begin.

My flipping back and forth works great but the TOC does not auto-sync despite me having that checkbox enabled on the windows in both projects.

Then I added a Custom Button in each project (let's call it Cat in English and Chat in French) that points to a Redirect Topic (using the meta refresh method) to launch a Remote Topic.  The redirection works great but again, the TOC does not auto-sync.

Getting back to my English/French setup... let's say I'm in the English project CHM, I change my display language to French, all of the interface buttons change to French except my Custom Button which is still "Cat".  From what I've read, I'm guessing there's no way around this?  I'd rather not have to put "Cat/Chat" for the Custom Button text or leave it as is where it will stick out like a sore thumb unless my display language always matches my language content.

Any suggestions or am I stuck with what I have?

This topic has been closed for replies.

1 reply

Captiv8r
Legend
July 3, 2009

Hi there

I'm a bit confused to say the least.

You have two different CHM files, right? One in English and one in French.

I'm assuming your JavaScript allows displaying the matching topic from the other language? If so, isn't the matching topic simply replacing the topic that was there before? Here's where it gets real fuzzy. The TOC should already be synced to the topic. Are you saying it loses focus or something?

If there are two projects, one in English and one in French, each project would have its own Custom Button definition, right? So why not enter Chat in the French project?

Personally, assuming I'm correctly understanding this setup, I would think you are somewhat asking for trouble if you allow a click within a topic to change the language. I would think it to be a better solution just to keep the user inside the same help file. Choose the language at the beginning if you like, but remain in that language until the file is closed.

Cheers... Rick

Helpful and Handy Links

Known Participant
July 3, 2009

You have two different CHM files, right? One in English and one in French.

Correct... one English, one French.

I'm assuming your JavaScript allows displaying the matching topic from the other language? If so, isn't the matching topic simply replacing the topic that was there before? Here's where it gets real fuzzy. The TOC should already be synced to the topic. Are you saying it loses focus or something?

My javascript determines the matching topic from the other CHM and changes the window location to the other topic.  If I'm in the English help, on an English topic and click my French link, the link opens the corresponding French topic but my TOC never changes to the French TOC - it's still showing the English one.

If there are two projects, one in English and one in French, each project would have its own Custom Button definition, right? So why not enter Chat in the French project?

I would have Chat in the French project for the Custom Button... the confusion would be if I open the French CHM while my Windows display language is English or change my Windows display language to French and open the English CHM.  In those scenarios, the interface buttons will be correct but the Custom Button text will match the content language rather than the interface language - that's when it will look wrong.

Personally, assuming I'm correctly understanding this setup, I would think you are somewhat asking for trouble if you allow a click within a topic to change the language. I would think it to be a better solution just to keep the user inside the same help file. Choose the language at the beginning if you like, but remain in that language until the file is closed.

Ah, but the end users want on-the-fly translation by topic without having to open the other CHM and find the topic all over again.  This is CSH, so the user may very well have gotten directly to a topic and would like to see the other language immediately.  Essentially, it should be as though the user closed the current CHM, opened the other CHM and located the exact same topic - instantaneously

Participating Frequently
July 3, 2009

You have two different CHM files, right? One in English and one in French.

Correct... one English, one French.

Yay! I understood!

I'm assuming your JavaScript allows displaying the matching topic from the other language? If so, isn't the matching topic simply replacing the topic that was there before? Here's where it gets real fuzzy. The TOC should already be synced to the topic. Are you saying it loses focus or something?

My javascript determines the matching topic from the other CHM and changes the window location to the other topic.  If I'm in the English help, on an English topic and click my French link, the link opens the corresponding French topic but my TOC never changes to the French TOC - it's still showing the English one.

Okay, so that's not really a synchronization issue. In my view, synchronization means expanding and highlighting the page in the TOC so the user may see where they were.

If there are two projects, one in English and one in French, each project would have its own Custom Button definition, right? So why not enter Chat in the French project?

I would have Chat in the French project for the Custom Button... the confusion would be if I open the French CHM while my Windows display language is English or change my Windows display language to French and open the English CHM.  In those scenarios, the interface buttons will be correct but the Custom Button text will match the content language rather than the interface language - that's when it will look wrong.

Gotcha.

Personally, assuming I'm correctly understanding this setup, I would think you are somewhat asking for trouble if you allow a click within a topic to change the language. I would think it to be a better solution just to keep the user inside the same help file. Choose the language at the beginning if you like, but remain in that language until the file is closed.

Ah, but the end users want on-the-fly translation by topic without having to open the other CHM and find the topic all over again.  This is CSH, so the user may very well have gotten directly to a topic and would like to see the other language immediately.  Essentially, it should be as though the user closed the current CHM, opened the other CHM and located the exact same topic - instantaneously

I'm thinking that perhaps a possible answer would involve using an HTML Help Shortcut control to launch a new instance of the viewer. Open the CHM for the correct language and display the relevant topic. What I think you will have issues with here is that the CHM viewer adapts to the language of the operating system I believe. So I'm not sure the TOC will know how to dynamically interpret you want French or English. Maybe it will based on the language choice in RoboHelp. But I'd be surprised if it worked that way.

Hopefully Pete Lees will see this thread and pop in to offer some other insight.

Pffft Pffft tap tap tap... is this thing on? Earth to Pete. Calling Pete. Pete, are you there and monitoring this frequency?    ... - - -  .... ---.--

Cheers... Rick

Helpful and Handy Links


Hi, MaritimeGirl, Rick,

Yes, I believe that Rick is correct: you'll probably want your script to execute an HTML Help Close control (to close the current Help window) and execute an HTML Help Shortcut control (to open the other Help file). This posting in the microsoft.public.helpauthoring newsgroup may give you some ideas:

http://groups.google.com/group/microsoft.public.helpauthoring/msg/696d0f2c74ea4f49

Or I may be able to work up some sample Help files, if you think it could be useful.

On the localisation of the text labels for the custom toolbar buttons, I don't think there's much you can do about that. These text labels are set at compile time, obviously, and can't be altered dynamically at run time. Is there a language-agnostic term that you can use in both Help windows? Could you make do without any button labels at all?

Pete