Skip to main content
Every template has a Document language. It decides the language of month and day names in dates, and of the wording Foliant prints, such as “Invoice”, “Subtotal” or “Ship to”. You can print documents in your shop’s language, in each customer’s language, or always in one language.

Choose the document’s language

In the editor’s top row (or on the template’s settings page), choose the Document language: The preview follows the language straight away. With Customer’s language, it uses the preview order’s language. Arabic, Hebrew, Persian and Urdu documents print right to left. If Foliant has no wording in the document’s language, it uses your shop’s language, then English. A single word without a translation prints in English.

Format dates

Dates such as created_at print in a raw format. Use the date filter to format them:
Month and day names are in the document’s language: %B prints “Januar” in a German document. To print them in another language, add it after the format, for example the customer’s: {{ created_at | date: '%A %d %B', customer_locale }}. Times are in your shop’s time zone. {{ 'now' | date: '%d %B %Y' }} prints today’s date.

Translate wording in code templates

Use the t filter (also called translate or label) for Foliant’s wording in the document’s language:
Shopify Order Printer’s wording keys work too, so imported templates keep their translations. Choose a Second language in the editor’s top row, then use t_both where you want both:
When there’s no second language, or both read the same, t_both prints one.

Translate text in visual templates

Blocks print their own wording in the document’s language. For text you write yourself (Text and Legal footer blocks with your own text, and a Header’s custom line):
  1. Select the block and open Content.
  2. In Language, choose a language. Languages with a translation show “(translated)”.
  3. Type the text for that language.
The translation prints when the document is in that language. Otherwise, the Default text prints.

Good to know

  • The Number format in the top row decides whether money and numbers follow the document’s language (1.234,56 €) or your store’s format. See Money and currency in templates.
  • {{ customer_locale }} prints the customer’s language code, such as de or fr-CA.
  • Templates for all the selected orders can’t use Customer’s language: a batch has many customers.
  • Print in the customer’s language, under Pick the right template automatically, turns on Customer’s language for several templates at once. See Pick the right template automatically.