External reference for translated strings

23 views
Skip to first unread message

Leroy Steinbacher

unread,
Sep 28, 2022, 2:08:59 PM9/28/22
to DITA-OT Users
Hi There, 

Has anyone referenced translation strings used for generated text outside of the DITA-OT? We would like to make changes to an external file without having to deploy a new version of our custom plugin.

Any suggestions?

Thanks, 

Leroy Steinbacher

Toshihiko Makita

unread,
Sep 29, 2022, 10:31:00 PM9/29/22
to DITA-OT Users
Hi Leroy,

I have the same problem when developing DITA-OT PDF/HTML plug-in. In the year 2012, I have discussed with my user how to control the language specific literals. Until then we have translated literal strings in DITA-OT plug-in side. When the user adds the new language, we must deploy new plug-in. It is too tedious.
As the result with user discussion, we have determined to have language literal string file in the CMS side. For instance, following XML file is stored in RWS Tridion Docs CMS.

<?xml version="1.0" encoding="UTF-8"?>
<variables xmlns="http://www.antennahouse.com/names/XSLT/Document/Layout">
   <!--
    common literal
   -->
   <!-- note -->
  <variable name="Note_Note">Note</variable>
  <variable name="Note_Caution">CAUTION</variable>
  <variable name="Note_Warning">WARNING</variable>
  <variable name="Note_Notice">NOTICE</variable>
  <variable name="Note_Other">Remarks</variable>
  <variable name="Note_Information">INFORMATION</variable>
   <!-- toc title -->
  <variable name="Toc_Title">TABLE OF CONTENTS</variable>
  <!-- appendix title -->
  <variable name="Appendices_Title">Appendices</variable>
  <variable name="Appendix_Title">Appendix</variable>
</variables>

This file is described in the main bookmap as @outputclass="stylesheet-resource" @processing-role="resource-only".

 <topicref format="xml" href="language-resource.xml" outputclass="stylesheet-resource" processing-role="resource-only"/>

This file is not present in the merged-middle file in PDF output. So, I have added one XSLT step in buld.xml to get this file location.
Then I merged this file into our PDF5-ML style definition file.


As a result, we have no responsibility to deploy new plug-in when user add the new language in their publication. This method is very convenient.

Hope this idea helps your development.

Regards,

-- 
/*-------------------------------------------------------------------------------------
 Toshihiko Makita
 Development Group. Antenna House, Inc. Ina Branch
 Web site:
 http://www.antenna.co.jp/
 http://www.antennahouse.com/
 ----------------------------------------------------------------------------------------*/   


2022年9月29日木曜日 3:08:59 UTC+9 leroyste...@gmail.com:
Reply all
Reply to author
Forward
0 new messages