Text and JavaScript behavior

Part of the text that you see on screen, such as interact questions, originates from the KCM Master Template itself. Some of the text is defined in KCM ComposerUI. Localized versions of these text parts are stored in the subfolder "resources." You can override the standard text for a particular language by creating a "resources" folder in your application containing the following files:

  • <lang>_custom.msg, this file contains the text like header and footer text, titles and "supporting" interact text, such as "loading document..."

  • <lang>_errors.msg, this file contains the text of the error messages

  • <lang>_gui.msg, this file contains the text that is shown in the configuration pages

  • <lang>.js, this file contains the text that are used by JavaScript code that is executed at the client, such as the calendar control

For the new div-oriented KCM ComposerUI output, additional <lang>.js resource files have been placed in the subfolder "res". This language file may also contain code that sets the texts of the jQueryUI DatePicker, which is used in the new output. For more information, see res\nl.js and http://docs.jquery.com/UI/Datepicker/Localization.

Some text, like "Ok" and "Back", originates from KCM Core. When the TranslateOnLineResources setting on KCM Core is set to "N", KCM Core will output message codes instead of literal texts. For the div-oriented output, these messages are translated using the resource files in the subfolder "res". See res\nl.js for more information.

The TranslateOnLineResources on KCM Core can be found on the General tab of the Environments.

The behavior of the pages is determined by two javascript variables:

  • numEditFormat

    This variable determines whether numerical fields are shown in one or in two input boxes. In <lang>.js, assign 1 to this variable to show only one input box for a numerical field. The default value is 2, in which case two input boxes will be shown: one box on each side of the decimal point.

  • fileEditActiveX

    It is a boolean variable that determines whether or not an ActiveX-control is used for file upload questions. By default this is the case (fileEditActiveX = true). If the variable is set to false, a native HTML file upload control is used. In this case, the default value for the file upload question, the default provided in the model, is ignored. For the div-oriented output this variable is deprecated. Use the variables in res\settings.js instead.

The Language Preference settings of your browser and the Default Locale and Locale Override settings of your application determine which files KCM ComposerUI will use. The defaults for these resources can be found in the folder "resources" of the KCM ComposerUI installation. When overriding them, they should be placed in a subfolder "resources" inside the application folder.