JSClientSideLocalisation

From GeoMedia Smart Client
Jump to: navigation, search
GMSC 2013/2014 Javascript API Overview Form Events Types Utility Functions client-side Validation Conditions Interaction with SmartClient Cookbook Cheatsheet
Utility Functions Request and URL Handling Localisation Dialogs & Notification Workflow Utility Functions


Localisation of client-side application messages and UI widget texts

GMSC 2014 With the ig.culture.js file it is possible to localize many application messages and UI widget texts, such as the status message of the grid (e.g. "showing 10 of 413 items"). By default, these messages are shown in English, which can disturb the appeareance of an otherwise localized workflow. In order to localize the client side application messages, perform the following steps:

  1. Copy the contents of the file below in a text editor or clone the file <YOUR_WORKFLOW_FOLDER>\Intergraph.Emea.Workflows\Content\Scripts\IGForm\cultures\ig.culture.en.js
  2. Localize the language strings for your desired language (Please leave placeholders like {1} oder html tags intact)
  3. Save the file as <YOUR_WORKFLOW_FOLDER>\Intergraph.Emea.Workflows\Content\Scripts\IGForm\cultures\ig.culture.<CULTURE_NAME>.js - see Table of Language Culture Names for a reference.

Contents of the ig.localize.js file

window.IG = window.IG || {};
 
(function (IG) {
    IG.localize = IG.localize || {};
 
    IG.localize.currentCulture = {
 
        //localisation messages for Form Grid
        //Online Documentation: http://smartclient.intergraph.at/documentation/JSGrid
        gridPagableMessage: '{1} of {2} items ', //tells the user the number of total items and how many of them are shown on the current grid page
        gridEmptyMessage: 'No items to display', //only shown if the grid doesn't contain any items*
        gridPagableSelection: '- <span class="ig-grid-selectnum">{n}</span> selected', //displays the number of selected grid items
        gridFirstPage: 'Go to the first page', //help text for the first-page-button (|<)*
        gridPreviousPage: 'Go to the previous page', // help text for the previous-page-button (<)*
        gridNextPage: 'Go to the next page', //help text for the next-page button (>)*
        gridLastPage: 'Go to the last page', //help text for the last-page button (>|)*
 
        //localisation messages for Overview List
        //Online Documentation: TODO
        listDeleteMissingID: 'Could not delete item, ID is missing!',
        listDeleteConfirmTitle: 'Delete an item',
        listDeleteConfirmMessage: 'Do you really want to delete this item',
        listDeleteOkMessage: 'Yes',
        listDeleteCancelMessage: 'No',
 
        //general localisation messages for form validation errors
        //Online Documentation: http://smartclient.intergraph.at/documentation/JSFormModel
        formValidateErrorMessageSingular: 'You have the following error in your form', //shown if one error was found
        formValidateErrorMessageMultiple: 'You have the following errors in your form', //shown if multiple errors were found
        formValidateErrorsMessage: 'You have validation errors on following form fields which are hidden:', //shown if validation errors in hidden fields were found
 
        //FieldModel FilePicker
        //Online Documentation: http://smartclient.intergraph.at/documentation/JSFilePicker
        filePickerUploadFail: 'Could not upload file: ',
        filePickerDeleteFail: 'Could not delete file: ',
        filePickerSelectionError: 'Error at file-selection: Could not load name of selected file',
        filePickerMaximumFileCount: 'You are not allowed to upload more files. You reached the maximum file-upload-number: ',
        filePickerTypeMismatch: 'Wrong type of file! You have to upload files with following extension(s):  ',
        filePickerDragAndDropHint: 'Drag and drop files here.',
        filePickerSelect: 'Select',
        filePickerDownload: 'Download',
 
        //FieldModel ComboBox / EditableComboBox
        //Online Documenation: TODO
        comboBoxNone: '(None)',
 
        //IG.Busy
        //Online Documentation: http://smartclient.intergraph.at/documentation/JSUtilDialogs#IG.Busy_.28options.29
        busyMessage: 'Please wait...',
        busyTitle: 'Form is currently busy',
 
        //IG.Confirm
        //Online Documentation: http://smartclient.intergraph.at/documentation/JSUtilDialogs#IG.Confirm_.28options.29
        confirmTitle: 'Confirm',
        comfirmMessage: 'Are you sure?',
        confirmOkMessage: 'Yes',
        comfirmCancelMessage: 'No',
 
        //IG.delayedSubmit
        //Online Documenation: TODO
        delayedSubmitMessage: 'Finishing Pending requests',
 
        //Report
        //Online Documentation: TODO
        reportStarted: 'Report: "<%= reportName %>"  Format: "<%= reportFormat %>" - started'
    };
 
})(IG);


Blue.pngentries marked with * have no effect yet in the current GMSC 2014 version, but might be activated with future updates.