# Message Library Maintenance

> Source: https://manual.pvxplus.com/nomads-graphical-application/message-library-maintenance/overview

The NOMADS **Message Library Maintenance** is used to set up message libraries that can be accessed by various different graphical user interface applications. Setting up a message library allows standardized messages for prompts, errors and warnings to be easily maintained as they can be updated from a common source. The PxPlus **[File Maintenance Generator](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/fmgen/fmgen-introduction)** and **[Query Subsystem](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/overview)** use the message library *\*msglib.en* to maintain prompts and button messages, as well as all warning and error messages.

***Example:***

In this example, a message *Key* was entered when defining the **Text** property for the Button control. This *Key* is used to retrieve the message text from the message library when the panel is processed. See **[Message Library Reference](https://manual.pvxplus.com/nomads-graphical-application/message-library-maintenance/message-library-reference)**.

![](https://manual.pvxplus.com/migration-assets/9969b10aae820e57267104066919cadcb3a91d5a9911927e65d3aefd02661e7b.png)

When the panel is processed, **\*winproc** passes the specified *Key* ("&WRITE") via the **[MSG( )](https://manual.pvxplus.com/functions/msg)** function to retrieve the message text. The equivalent process in PxPlus would be as follows:

```
MESSAGE_LIB "*msglib.en"
print msg("&WRITE")
```

Message libraries are also useful in supporting multilingual environments. See **[Multilingual Capabilities](https://manual.pvxplus.com/nomads-graphical-application/multilingual-capabilities/introduction)**.

For information on the use of message libraries in PxPlus, see **[MESSAGE_LIB](https://manual.pvxplus.com/directives/message-lib)** directive.

## Message Library Maintenance

**Message Library Maintenance** is used to add new messages to a message library in NOMADS, as well as update or delete existing messages.

It is invoked by using one of the following methods:

| **Location** | **Method** |
| --- | --- |
| From the **[PxPlus IDE Main Launcher](https://manual.pvxplus.com/pxplus-ide/ide-main-launcher)** | Expand the *Graphical Application Builder (NOMADS)* category. Then expand the *Setup* category and select *Message Library Maintenance*. |
| From the **[NOMADS Session Manager](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/getting-started#sessionmgr)** | From the *Options* menu, select *Message Library Maintenance*. |

The following window is displayed:

![](https://manual.pvxplus.com/migration-assets/14bb6c6c7931df602eaee05377ddf7adb32e34738b44652cab6d6236d86abf4e.jpg)

This window is divided into the following tabbed panels: **[Edit Message](https://manual.pvxplus.com/nomads-graphical-application/message-library-maintenance/overview#editmessage)**, **[Compare](https://manual.pvxplus.com/nomads-graphical-application/message-library-maintenance/overview#compare)** and **[Copy/Merge](https://manual.pvxplus.com/nomads-graphical-application/message-library-maintenance/overview#copymerge)**.

|  |  |
| --- | --- |
| *Library File* | Enter the name of the message library to be updated or click the Query button to select a different file. (***Default*** is *\*msglib.en*.)<br>This field can also be used to create a new application-specific message library, in which case a prompt to create the new file will display.<br>Important Note:<br>*\*msglib.en* is the message library used by PxPlus sub-systems; therefore, adding application-specific messages to this library is *not* recommended because it will be overwritten with subsequent upgrades. |
| **Edit Message** |  |
| **Message** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Message Key* \| Key that identifies the message to be added, updated or deleted. Use a string, up to 64 characters in length. Click the Query button *(binoculars)* for a list of existing messages in the current *Library File*.<br>Use the Message Key with the **[MSG( )](https://manual.pvxplus.com/functions/msg)** function to return values for use in your applications. You can pass optional arguments (comma-separated strings) for messages that have placeholders for arguments. \|<br>\| *Text (Translation)* \| Can be either *Text* or *Translation* based on the following:<br>*Text*<br>Available when a *Message Key* is entered ***and*** the *Reference Library File* check box is ***not*** selected.<br>*Translation*<br>Available when the *Reference Library File* check box is selected.<br>Enter message text (for either *Text* or *Translation*). This can contain placeholders for arguments to be passed in the messaging system. The format of the argument placeholder is *%n **where** n* is the argument sequence number, beginning at *%1* (one).<br>Use the Browse buttons to scroll through the message records of the selected message library. \|<br>\| *Write* \| Button used to update/add the current message to the selected message library file. \|<br>\| *Delete* \| Button used to remove the current message from the selected message library file. \|<br>\| *Print* \| Button used to print a list of the messages in the selected message library file. \|<br>\| *Clear* \| Button used to clear the message input fields. If unsaved changes are detected, a message will display to save the changes. \| |
| **Reference Text** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Reference Library File* \| Select this check box to display a reference file when translating. Enter the pathname of the message file in the adjacent field or click the Query button to select a file. The corresponding record will be displayed as *Reference Text* to aid the translation process. \|<br>\| *Reference Text* \| ***(Available only when Reference Library File check box is selected)***  <br>  <br>If you enter a *Message Key* or use the Browse buttons to scroll through a message library file, the corresponding record (if any) is displayed. When browsing, if records exist in the *Reference File* but not in the *Library* you are updating, these records are also displayed. \| |
| **Compare** |  |
| **Compare** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Source* \| Indicates the name of the source message library to be compared. Default is the current selection. Click the Query button to locate a different file. \|<br>\| *Compare* \| Indicates the path and file name of the message library to be compared against the source file. Click the Query button to locate a different file. \|<br>\| *Compare* \| Button used to compare the two files. Once compared, any differences are presented in the text box provided. \|<br>\| *Print* \| Button used to print a hard copy of the Compare results. \| |
| **Copy/Merge** |  |
| **Copy/Merge** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Copy To* \| Indicates the name of the file to which records are to be copied. \|<br>\| *Copy From* \| Indicates the path and name of the file from which records are copied. \| |
| **Copy Option** | Click the drop-down arrow for selections:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Merge Files* \| Copies just the records that are missing. Existing records are not overwritten. \|<br>\| *Overwrite (No Purge)* \| Copies all records. Duplicate records are overwritten; however, records that are unique to the receiving file are left alone. \|<br>\| *Purge File and Copy* \| NOMADS will clear the receiving file and select all records. The result is a duplicate of the file that was copied. \|<br>\| *Copy* \| Button used to perform the Copy process based on the selected option. \| |
|  |  |
| *Exit* | Closes **Message Library Maintenance** without saving changes. |

## See Also

**[Message Library Reference](https://manual.pvxplus.com/nomads-graphical-application/message-library-maintenance/message-library-reference)**  
**[MESSAGE_LIB Directive](https://manual.pvxplus.com/directives/message-lib)**  
**[Multilingual Capabilities](https://manual.pvxplus.com/nomads-graphical-application/multilingual-capabilities/introduction)**
