HotDocs Author WorkflowCreate a template Add placeholders Group variables in dialogs Upload a template Create a script

LANGUAGE Instruction

The LANGUAGE instruction enables you to declare the language whose rules you want to use to format any date or number values before adding them to your document during document assembly.

The LANGUAGE instruction currently only works like an instruction within a HotDocs field. Otherwise, when working within a script, the instruction works more like a system function that enables you to check the current language within the script.

Because the LANGUAGE instruction takes a text value, the values in the table below appear as text literals. When you change the formatting language within a template however, the field you add for this instruction does not display the quotes around these values.

HotDocs supports formatting dates and numbers only in the languages listed below. If you want to specify formats for dates and numbers in non-supported languages, you must use Text variables to provide formats for these values.

Language/Locale Code
Dutch "nl"
English (United Kingdom) "en-GB"
English (United States) "en-US"
French "fr"
German (Austria) "de-AT"
Germany (German) "de-DE"
German (Switzerland) "de-CH"
Italian "it"
Portuguese (Brazil) "pt-BR", "pt"
Spanish "es"
Swedish "sv"
DEFAULT  

Custom Separators for Number Variables

Whilst the LANGUAGE instruction has default number separator formats for each supported language, you can override these by specifying custom separators in the Thousands Separator and Decimal Separator properties in the Field Editor.

Number Formats and Non-Breaking Spaces

By default, HotDocs interprets non-breaking spaces within a number format as a decimal separator. If you want to use non-breaking spaces as thousands separators, specify these in the Thousands Separator property in the Field Editor.

When formatting a number for currency, if the currency symbol is placed after your number, e.g. 999 $, you may find that using non-breaking spaces is helpful. Using a non-breaking space between the number field and the currency symbol ensures that Microsoft Word perceives the number and its symbol as one word. This prevents the number being broken across lines.

Example

The LANGUAGE instruction tells HotDocs to format numbers and dates in a the language you indicate. For example, the following tells HotDocs to assemble the document (from the point where you add the instruction) using Spanish formats for numbers and dates:

    [LANGUAGE es]

If your number format requires non-standard thousands and decimal separators, you can specify which separators you want to use in the field properties of the LANGUAGE instruction.

Current Language Check Example

If you want to check the current language within a script, you can use the following:

IF LANGUAGE = "en-US"

//Do some thing

END IF