Advanced multi-language features

One of ClauseBase’s strongest assets, is how it handles multiple languages. In this article, you can learn all about advanced features.

The basics: printing a document in multiple languages

When all the clauses of a document are available in multiple languages, you can easily export a document in multiple columns by checking one or more languages in the export settings of Assemble Document.

Within a Q&A, the end-user can instead go button in the upper-right corner, and activate the same options from the popup-menu. Note that, unlike Assemble Document (for which the user interface is always in English), you can optionally translate the cards, questions and predefined options of a Q&A, and allow the end-user to switch the relevant language on-the-fly.

Disabling multi-language export in a Q&A

In the options of the Q&A, you can specify which languages should be available to the end-user — both with respect to the user interface (cards & questions) and for the actual document contents.

Checking or unchecking languages will cause a “language” question (which you can insert similar to how a text-based or number-based question is inserted into a Card) to show only the enabled languages.

If you want to completely disable the possibility for the end-user to export multiple languages, you can instead check the Multi-language export option at the bottom of the options panel of the Q&A.

Fine-grained control over multiple languages in the Q&A.

The Q&A options discussed above cannot be subjected to conditions. If you need more fine-grained control, you can insert two types of changes.

A first change is the “Change the save/export settings“, which contains a subsection that allows you to specify which languages (if any) need to be exported in columns.

When at least one extra language is checked, you can also specify dynamically the orientation and the optional borders between columns:

By subjecting the surrounding change-set to conditions, you can determine in which circumstances certain languages must be (de)activated. More detailed information can be found elsewhere.

A second type of change is the “Change various Q&A options“, which allows you to dynamically change the language of the user interface.

Language-related conditions in a Q&A

In a Q&A, there are two types of conditions that allow you to only show certain cards/questions/answers when certain languages are visible.

Language-related conditions in a clause

When drafting a clause, you can use a series of special functions, such as @english and @french (or any other language supported by the server you are using), to enable/disable certain clauses or snippets of text.

For example a condition such as @english AND #contract^value > 1000 EUR would only be shown when the contract is currently being printed in English, and the contract’s value is simultaneously higher than 1000 EUR. Note that when a contracting would be exported in multiple languages at the same time (e.g., English and French), this may cause the clause to be shown in the French column, but be hidden in the English column.

Reusing the clause contents between languages

It may happen that your clause does not contain any language-specific content, so that exactly the same contents should be shown in all available languages. You can of course copy-paste the same contents in each of the language boxes, but from a clause management perspective, this will cause extra work when you want to update that clause, as you will need to make the same changes to each of the languages.

Instead of copy/pasting, you can insert // Use English into the other language boxes to copy the contents from the English box. (Similarly, you could type // Use French to copy from the French language box.)

You could even mix-and-match the language content to reuse. For example, on the server above (which supports English, Dutch, German and Lithuanian), you could provide English content, insert // Use English in Dutch and French (so that Dutch and French language versions of the document will show the English contents of this clause), but also provide a German version and insert // Use German in the Lithuanian version.

Note that in the resulting MS Word-file, the paragraph(s) in question will then be in the target language. So if you use // English, the resulting paragraphs will be marked as English, even though the rest of the document will be marked with another language.

Always displaying a clause in a certain language

Even when a clause would have multiple language versions, you can force a certain instance of the clause to always show up in another language. (This can also be useful when certain content is only available in one specific language — instead of hiding that content in the other languages, or having errors show up, you can select this option to always print that one specific language.)

You can do so in Assemble Document by selected a clause and activating Force clause to always show in: in the Advanced pane at the right side.

Note that in the resulting MS Word-file, the paragraph(s) in question will then be in the target language. So if you use // English, the resulting paragraphs will be marked as English, even though the rest of the document will be marked with another language.

Avoiding translation in a multi-language export

Even when you want to export a document with a column per language, there are certain clauses where you want to avoid this behaviour. The typical example is the signature block, which is usually not translated because it merely contains the names of the parties.

To enable this behaviour for every instance of a clause, you can activate Don’t translate in multi-language output under the custom styling of a clause.

If, instead, you only want to enable this behaviour for one specific instance of a clause, you can add custom styling for that specific instance through the Advanced pane at the right side of Assemble Document.

Checking whether multiple languages are being exported

@multi-language returns true when the document is currently exported (to MS Word or PDF) in multiple languages. You may, for example, use this special function to only show a warning such as “Please note that even though this document contains both English and German content, only the German content is legally binding.” when the document is effectively printed in multiple languages.

Showing a concept-label in a specific language

Sometimes a clause in a multi-language document may need to refer to a specific concept-label or datafield in another language. For example, in a signature box (for which the Don’t translate in multi-language output is enabled, as per the discussion above) you may want to insert the title of the chairman in multiple languages. For such situations, @in-language will be of great help:

#president / @in-language(#president, "en")

Similarly, you may want to print a certain city (inserted by the end-user as a multi-language answer in the Q&A) in two different languages next to each other:

#signature^location / @in-language(#signature^location, "en")

Was this article helpful?
Dislike
Abstract article references