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  

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 date or number format requires non-U.S. thousands and decimal separators, you can specify which separators you want to use in the Advanced 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