Gretyl's Portal

Heretto Help

Show Page Sections

Implement Localization Strings into a Scenario

You can implement localization strings to translate the content that is automatically added by your Heretto PDF Generator publishing scenario.
  • Ensure that you are a Heretto CCMS Administrator.
  • Prepare a localized map.
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 Heretto CCMS.
Configure your publishing scenario
  1. In the top-left corner, click the Main Menu and go to PDF Generator.
  2. In the Scenario Configuration window, in the XSLT tab, reference the strings.xml file by adding the code immediately following the xsl:import:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
    
    <xsl:import href="/db/sdk2/internal/pdf_generator/pdf_generator.xsl"/>
    
    	<!-- Add this code -->
    <xsl:param name="variableFiles.url">/db/organizations/organization_name/repositories/master/__configuration/documents/language_strings/strings.xml</xsl:param>
    	<!-- End of add this code -->
    
    </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 are already translated. However, if you need to translate more strings, you can do that similarly to this step.
    1. In the XSLT tab, add the entire <xsl:template> from this example:
      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
      
        <xsl:import href="/db/sdk2/internal/pdf_generator/pdf_generator.xsl"/>
      
      <xsl:param name="variableFiles.url">/db/organizations/organization_name/repositories/master/__configuration/documents/language_strings/strings.xml</xsl:param>
      
       <!-- Add this code -->  
      <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> 
      
      <!-- End of add this code -->
      
      </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.

Edit the Heretto PDF Generator Localization Strings

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

Implement the localization strings. See Implement Localization Strings into a Scenario.
  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 Edit Source.
    For example, 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.

Upload Files to Heretto CCMS

You can upload various files types to Heretto CCMS, including DITA files, images, configuration files, and other allowed files.

For more information about files you can upload to Heretto CCMS, see What file types can I upload to Heretto CCMS?.

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.

  1. In the Content Library, navigate to the folder where you want to upload your files and click the Upload button.
  2. Indicate the files that you want to upload:
    • Click to choose files and select the files.
    • Drag and drop the files from your folder into the Drag and drop files here area.
  3. 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.
  4. If you selected any ZIP files that you do not want to be automatically unzipped, clear the corresponding Unzip check box.
  5. Click Upload Files.