Document Strings

Table of Contents

  1. Translations
  2. Insert image with Document Strings

Translations

The Document Strings feature allows you to render different text strings based on language.

The languages you want to use must be enabled in the company settings.

Assign a Selector and translate into the relevant languages. Use the Selector with Liquid in your custom template.

Example of use of Document Strings with Liquid

Selector assigned: tAvailabilityDate

 <div style="position: absolute; top: 64mm;  width: 26mm; left: 104mm; font-weight: bold">
{{ strings.tAvailabilityDate | upcase }}
</div>
 <div style="position: absolute; top: 64mm;  width: 26mm; left: 164mm">
{{ order.availability_date | date_format_document }}
</div>

which, based on partner language (in this case English/Danish), renders respectively

qr code

qr code

Insert image with Document Strings

You can use Document Strings to insert images like logos, signatures and photos.

Use an image encoder like Base 64 Image Encoder to convert the image into a text string.

Create a Selector in the Document Strings and insert the image text string as a translation for each language you want the image to appear.

Example of inserting image using Document Strings with Liquid

Selector assigned: tLogoTracezilla

 <img src="{{ 'tLogoTracezilla' | doc_string: 'en' }}" height="70" left="20mm"/>

which renders

qr code