Rename the relations group title

Post here questions and problems related to editing and publishing DITA content.
luodan
Posts: 19
Joined: Wed Aug 24, 2022 7:20 am

Rename the relations group title

Post by luodan »

Hi there,
How can I rename the group titles in the relations?
For example, the default titles are as the following:
image.png
image.png (22.83 KiB) Viewed 732 times
I want to rename the second one as Parent Interface Class.
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Rename the relations group title

Post by Costin »

Hi luodan,

If you want to rename the default "Related information" title all over the publication, you could use the localization support in WebHelp, by creating a plugin through which you could modify the existing strings with the ones of your own.
You should read this section from the WebHelp User-Guide for more information on how to create a localization plugin to modify the existing strings / labels.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
luodan
Posts: 19
Joined: Wed Aug 24, 2022 7:20 am

Re: Rename the relations group title

Post by luodan »

Hi Costin,
I‘m using the xpr project of the Oxygen XML Author for publishing, does it apply here?
luodan
Posts: 19
Joined: Wed Aug 24, 2022 7:20 am

Re: Rename the relations group title

Post by luodan »

I’m stuck in this step:
image.png
image.png (88.91 KiB) Viewed 651 times
I don't know what's the relationship between the translation files and this strings-en-us.xml file, because I searched the target variable I'm using, and it's in the latter file, and the strings-en-us.xml file is in the /scripts/oxygen/frameworks/dita/DITA-OT3.x/plugins/org.dita.base/xsl/common/ folder, so they seem to be the same thing to me.
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: Rename the relations group title

Post by julien_lacour »

Hello,

You can find attached an example of localization plugin with the Related Information text changed to "Parent Interface Class":
com.oxygenxml.webhelp.localization.zip
(1.26 KiB) Downloaded 130 times
You can directly unzip this plugin into OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\plugins or oxygen-publishing-engine-3.x\plugins (depending if you are using Built-in or Custom Oxygen Publishing Engine - you can check this in Preferences > DITA).

Another solution could be to use a <linklist> with a custom title, like in the following example:

Code: Select all

<related-links>
    <linklist>
        <title>Other reference</title>
        <link href="topic.dita"/>
    </linklist>
</related-links>
Regards,
Julien
luodan
Posts: 19
Joined: Wed Aug 24, 2022 7:20 am

Re: Rename the relations group title

Post by luodan »

Hi Julien,
Thanks for your reply, I've changed the title of the target title like this:
image.png
image.png (36.79 KiB) Viewed 579 times
And here comes another problem, you see we have 3 different relations in the relations ditamap, which are:
  • Method-Class Relations
  • Method-Callback Relations
  • API-Feature Relations
I searched the displayed word "Related reference" and it is used in several places, but I'm not sure where is the mapping in different relations, can I define different title for each relation?
Last edited by luodan on Mon Nov 07, 2022 1:50 pm, edited 2 times in total.
Post Reply