HDInterviewOptionsLanguageModule Field
An object (associative array) containing one or more language modules to load. The name of each item in array is the name of the language module (e.g., "en-GB") and the value is the URL from which the JavaScript file containing the language module can be downloaded.

JavaScript API: Direct
Assembly: api.js Version: (

var LanguageModule

Field Value

Type: object

A browser interview can be associated with only a single locale, so in most instances only a single JavaScript file will need to be loaded. This is especially true since a single JavaScript file can contain multiple language modules. However, since specific language modules can inherit behavior from more general language modules; therefore a situation could arise where you need to load multiple JavaScript files to ensure the desired behavior.

When using the Direct JavaScript API, you have the choice of loading language modules either using this property, or on your own (inline in script blocks or by loading them from external scripts). When using the Embedded JavaScript API (with Cloud Services), language modules must be loaded using this property.

To learn more about interview locales and how to add support for locales other than US English, see Browser Language Module.


To tell HotDocs where to download a language module:
var HDInterviewOptions = {
    Locale: "en-US-mycompany",
    LanguageModule: { "en-US-mycompany": "http://mycompany.com/hdrelated/hdlang-customized.js" }
In the above example, the "en" and "en-US" language modules are defined internally by HotDocs. A set of 3rd party language strings is being loaded in order to override some of the built-in interview language.

In the following, more complex example, a generic German language module is being loaded from one URL, a module with modifications specific to the Swiss locale is loaded from a different URL, and 3rd-party-specific language string customizations are loaded from a third. This might be a stretch.

var HDInterviewOptions = {
    Locale: "de-CH-mycompany",
    LanguageModule: {
        "de": "http://url/to/hdlang-de.js",
        "de-CH": "http://url/to/hdlang-des.js",
        "de-CH-mycompany": "http://url/to/hdlang-des-mycompany.js"
See Also