Implement Localization Strings into a Heretto PDF Generator Scenario

You can implement localization strings to translate the content that is automatically added by your Heretto PDF Generator publishing scenario.
Add the localization string files
  1. Download the language_strings.zip file.
  2. In the content library, navigate to the __configuration folder.
    Note: If you can't locate the __configuration folder, contact your Customer Success Manager.
  3. Create the language_strings folder.
    The __configuration/language_strings folder exists.
  4. In the language_strings folder, Upload the ZIP file that you downloaded in 1.
    For more information, see Upload Files to the Content Library.
Configure your publishing scenario
  1. In the Dashboard interface, from the Administration menu, select PDF Generator.
  2. In the Scenario Configuration window, in the XSLT tab, reference the strings.xml file by adding the following bold code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
    
      <xsl:import href="../../../../../../../../sdk2/internal/pdf_generator/pdf_generator.xsl"/>
    
    <xsl:param name="variableFiles.url">/db/organizations/organization_name/repositories/master/__configuration/documents/language_strings/common/strings.xml</xsl:param>
    
    <!-- ... --> 
    
    </xsl:stylesheet>

    Where: organization_name is the name of your Heretto CCMS organization.

  3. To translate the “Contents” label in the Table of Contents (TOC):
    Note: A number of strings is already translated. However, if you need to translate more strings, you can do that analogically to this step.
    1. In the XSLT tab, add the following bold code:
      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
      
        <xsl:import href="../../../../../../../../sdk2/internal/pdf_generator/pdf_generator.xsl"/>
      
      <xsl:param name="variableFiles.url">/db/organizations/organization_name/repositories/master/__configuration/documents/language_strings/common/strings.xml</xsl:param>
      
        <xsl:template match="*[contains(@class, ' map/map ')]" mode="toc">
          <xsl:param name="pathFromMaplist"/>
          <xsl:if test="descendant::*[contains(@class, ' map/topicref ')]                                [not(@toc = 'no')]                                [not(@processing-role = 'resource-only')]">
            <nav>
              <h1>    
                  <xsl:call-template name="getVariable">
                      <xsl:with-param name="id" select="'Contents'"/>
                  </xsl:call-template>
              </h1>
              <ul>
                <xsl:call-template name="commonattributes"/>
                <xsl:apply-templates select="*[contains(@class, ' map/topicref ')]" mode="toc">
                  <xsl:with-param name="pathFromMaplist" select="$pathFromMaplist"/>
                </xsl:apply-templates>
              </ul>
            </nav>
          </xsl:if>
        </xsl:template> 
      
      <!-- ... --> 
      
      </xsl:stylesheet>
    2. At the bottom of the CSS tab, add the following code:
      nav::before {
        content: normal;
      }
  4. Click Save Scenario.
Verify if the strings are localized as expected
  1. In the right pane, click Select map to preview and select a localized map.
  2. From the Locale drop-down menu, select a map locale.
  3. Click Generate PDF.
If needed, edit the default localization strings. See Edit the Heretto PDF Generator Localization Strings.

Upload Files to the Content Library

You can upload images and other allowed file types to the content library.

  • If you want to upload a large number of files, compress these files to a ZIP archive.
    Tip: Uploading files compressed to a single ZIP archive is quicker than uploading multiple files without compressing them first.

    By default, when you upload a ZIP archive to the content library, Heretto CCMS unzips the archive retaining its folder structure. If needed, you can also upload a ZIP archive to the content library without unzipping it.

    Uploaded files must be under 100MB in size.

  1. In the content library, navigate to the folder where you want to upload your files and click the Upload icon.
  2. If you selected any files that already exist in the content library folder and you don't want to overwrite them, clear the corresponding Overwrite files with the same names check box.
  3. If you selected any ZIP files that you do not want to be automatically unzipped, clear the corresponding Unzip check box.
  4. Click Upload Files.

Edit the Heretto PDF Generator Localization Strings

You can edit the default Heretto PDF Generator localization strings directly in Heretto CCMS.

  1. In the content library, navigate to the __configuration folder.
    Note: If you can't locate the __configuration folder, contact your Customer Success Manager.
  2. In the language_strings folder, right-click the XML file that corresponds with the language strings that you want to modify and select Open in Source Editor.
    The strings-pl-pl.xml file corresponds with Polish localization strings.
    Tip: You can adjust symbols like quote signs by editing the strings-common.xml file.
  3. Edit the <str> elements contents.
  4. Click Save.