Translation of all of the variables

Nothing is perfect! This is where you can post your ideas and wishes for functions you'd like to see in Help & Manual. Current version only please (H&M7).

Moderators: Alexander Halser, Tim Green

Post Reply
keskifo
Posts: 8
Joined: Tue Dec 08, 2009 4:38 pm

Translation of all of the variables

Unread post by keskifo »

Hello everyone at EC software,

We came across some issues when translating some help and manual projects in several languages, especially with the webhelp template. There are a few texts that you can't translate as they are hard coded in the html template.

i.e.:
1. Enter one or more keywords to search ('*' and '?' wildcards are supported):

2. You must have JavaScript enabled to use this version of the search engine.

3. <a href="<%HREF_CONTENT_PAGE%>">Contents</a>
<IF_INDEX_PAGE> | <a href="<%HREF_INDEX_PAGE%>">Index</a></IF_INDEX_PAGE>
<IF_SEARCH_PAGE> | <b>Search</b></IF_SEARCH_PAGE>

4. This page requires frames<br><a href="<%HREF_CONTENT_PAGE_STATIC%>">Click here to view the table of contents without frames</a>

Do you think it would be possible to put variables instead and have them translated for your next release?

Thank you for your input,
François
User avatar
Tim Green
Site Admin
Posts: 23175
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Translation of all of the variables

Unread post by Tim Green »

Hi Francois,

Actually, these texts are directly available for translation. In fact, most of them are already translated, so you shouldn't need to translate them at all. The search interface texts can be loaded and saved directly with the Load/Save tools in Project Explorer > Configuration > Publishing Settings > Webhelp > Full Text Search (see screenshot below). There are already translated language files available for most major European languages, they are stored in the Templates/Webhelp folder in the Help & Manual program directory. These are plain text files, so if you need to create a new one in a new language you can just translate one of the existing ones.

The Index, Search, Contents and other texts in the HTML templates can easily be replaced with variables if you want. Just define the variables in the project configuration settings, and then replace the texts in the templates with the variables. For example, if you define INDEX_CAP for the index caption you would replace the text Index in the template with <%INDEX_CAP%>.
You do not have the required permissions to view the files attached to this post.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
keskifo
Posts: 8
Joined: Tue Dec 08, 2009 4:38 pm

Re: Translation of all of the variables

Unread post by keskifo »

Hello Tim,

Is there a way to have the variables stored in a file to be translated? As far as I know, the variables are not exported in any of the *.xml file. The only way would be to copy/paste them in the project once translated?

Thanks for your help,
François
User avatar
Tim Green
Site Admin
Posts: 23175
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Translation of all of the variables

Unread post by Tim Green »

Hi Francois,

Variables are stored in the main .hmxp file which is 100% pure XML. The variables are stored with a value of translate=true, so they should appear normally in your XML-capable translation program like Trados. Alternatively you can also export and import the variables to a text file for translation with the Export/Import buttons in Configuration > Common Properties > Text Variables. Note that this does not store the "HTML/Text" and "Protected" settings of the variables, so if you do this you must reset these settings after re-importing.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Muneer Ahmed
Posts: 8
Joined: Wed May 04, 2011 3:18 pm

Re: Translation of all of the variables

Unread post by Muneer Ahmed »

Hi Tim,
You wrote in the "https://helpman.it-authoring.com/postin ... 70#pr42563" post about the way to translate the Strings in the "Search Panel" in the published Web Help (HTML Help) (and may be the CHM help, too). I use Help and Manual for documentation in my company. I have followed the whole procedure but the text is still appearing in English whereas I need it in German and Japanese.

My main concern is to translate the following strings, please tell me how I can do that?

Contents | Index | Search
Enter one or more keywords to search ('*' and '?' wildcards are supported):
Results per page:
Match: any search words all search words

I greatly appreciate your help in this regard.
Most Sincere Regards,
Muneer
User avatar
Tim Green
Site Admin
Posts: 23175
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Translation of all of the variables

Unread post by Tim Green »

Hi Muneer,
My main concern is to translate the following strings, please tell me how I can do that?
Before you begin, note that you need to do your editing in the .hmskin file if you are using a skin, and in your project file if you are not. So load either the skin file or the project file in Help & Manual before starting.

Unless you are using pre-designed skins, the Contents | Index | Search texts are in the source code of the HTML templates for the Table of Contents, Keyword Index and Full Text Search. You can access these templates in the Project Explorer in Configuration > Publishing Options > WebHelp.

IMPORTANT WARNING: Don't switch back to simple layout mode tab when editing templates in skins with edited source code! Doing this will replace your edited version with the default template and delete your changes. You will be warned if you try to do this, and this is a warning you should take seriously. This is particularly important when editing pre-designed skins, as switching to simple mode there will delete all the custom code and make the skin unusable.

The Enter one or more keywords to search ('*' and '?' wildcards are supported): is also in the body of the Full Text Search template.

The Results per page: and Match: any search words all search words texts are in the search interface string table in the Full Text Search section. You can edit and translate these texts directly in the table there. However, language files for most languages are already available for these texts. To load them, click on the Load/Open icon above the table on the right and select the file for the appropriate language. After loading you can check the translations and make changes if you want. You can then save the changed version with the Save icon next to the Load icon.

These strings are
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Muneer Ahmed
Posts: 8
Joined: Wed May 04, 2011 3:18 pm

Re: Translation of all of the variables

Unread post by Muneer Ahmed »

Hi Tim,
Thank you very much.
So nice of you. It really helped.
Sincere Regards,
Muneer
Post Reply