# Library Language Translator

> Source: https://manual.pvxplus.com/nomads-graphical-application/multilingual-capabilities/library-language-translator/overview

This utility will translate NOMADS and Message libraries from one language to another.

To access the Library Language Translator, go to the [NOMADS Session Manager](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/getting-started#sessionmgr) and from the *Utilities* menu, select **Library Language Translation**.

[http://wiki.pvxplus.com/images/2/22/Xlate.jpg](http://wiki.pvxplus.com/index.php/File:Xlate.jpg)

The language translation is facilitated through either Google's Translate API or Microsoft's Bing utilities. Before you can run a translation, an API key from the Translate API service is required.

For a Google Account, visit **[http://code.google.com/apis/language/translate/v2/getting_started.html](http://code.google.com/apis/language/translate/v2/getting_started.html)** and create an account.

For a Microsoft account, visit **[http://www.bing.com/developers/appids.aspx](http://www.bing.com/developers/appids.aspx)**. The supplied key can then be transferred to the *Translate Key* entry field.

[http://wiki.pvxplus.com/images/d/d0/Xlate_key.jpg](http://wiki.pvxplus.com/index.php/File:Xlate_key.jpg)

## Text Sources

Text comes from a number of locations. In the case of NOMADS libraries, it will come from control objects and their associated properties.

| **Control Type** | **Description** |
| --- | --- |
| *Button* | Text/Bitmaps, Floating Tip, Help Reference, Message Bar and Automation Text |
| *Radio Button* | Text/Bitmaps, Floating Tip, Help Reference, Message Bar and Automation Text |
| *Check Box* | Text/Bitmaps, Floating Tip, Help Reference, Message Bar and Automation Text |
| *List Box* | List Values, Floating Tip, Help Reference, Message Bar and Automation Text |
| *Drop Box* | List Values, Floating Tip, Help Reference, Message Bar and Automation Text |
| *Multi-Line* | Floating Tip, Help Reference, Message Bar and Automation Text |
| *Fonted Text* | Text |
| *Text* | Text |
| *Frame* | Title |
| *Vertical Scrollbar* | Floating Tip, Help Reference and Message Bar |
| *Horizontal Scrollbar* | Floating Tip, Help Reference and Message Bar |
| *Folder* | Tab Definition |
| *Grid* | Format Definition, Presets, Floating Tip, Help Reference and Message Bar |
| *Chart* | Title 1, Title 2, X-Axis Title, Y-Axis Title, Z-Axis Title, Floating Tip and Help Reference |

For Message libraries, text will come from the *Text* field.

## Load Libraries

To begin the process, text to be translated needs to be loaded. Select the NOMADS or Message libraries to load and list the required text in the *Old Text* column. Multiple libraries can be loaded to build a master Translation Table.

Save the *Old Text* to keep from having to reload libraries. The *Save* button will prompt for location and file name of the Translation Table.

To export translation table lists, click on the *Export* button, select a location, file name and file type. The preferred file type would be in CSV format. This allows the option to import into Excel for third-party adjustments.

The **Import** allows text to be loaded into the list. The column headers *Old Text* and *New Text* should be ignored during the import, if they were not removed from the import file prior to the import.

## Translation

To run a translation, select a language from the drop-down list or enter one from the list of available language translations. Consult the Translation API's site for the available language codes. The *Translate* button will begin the process. It may take a few seconds to begin as a connection must be made over the Internet. The translated text will show on the *New Text* column opposite the *Old Text*. Pressing the **Esc**ape key will interrupt the translation. The *Old Text* will only be translated when the corresponding *New Text* column is empty.

The process will attempt to keep Hot Key characters active and move the *ampersand* to the first matching character. If one does not exist in the translated text, then it will prefix the translated text with the *ampersand*, original character and *colon*. The text will also display in the *Warnings* list to allow quick access by double clicking for manual adjustment. *New Text* can be manually adjusted by entering any translation opposite the *Old Text*. To remove a warning from the list, make an adjustment to the text and click the *Refresh* button.

## Apply

When the translation table is ready to be applied against NOMADS or Message libraries, click the *Apply* button.

The *Resize* check box will attempt to adjust the size of *Text* and *Fonted Text* controls. The first attempt will be to lengthen the display. If more space is required, then it will move the starting location incrementally to the left until it either runs out of space or it fits.

[http://wiki.pvxplus.com/images/3/32/Xlate_save.jpg](http://wiki.pvxplus.com/index.php/File:Xlate_save.jpg)

A secondary window will open to collect the library to which to apply the translation and the name of the new library. The apply process will read through the library and apply any matching translated text and write it out to the new library.

## Report

You can view a report of all translations. To print or save the report, right click on the list box and choose the appropriate menu item.

[http://wiki.pvxplus.com/images/0/05/Xlate_print.jpg](http://wiki.pvxplus.com/index.php/File:Xlate_print.jpg)

## Suggested Operation

***Building a Translation Table***

1. Load one or several libraries to create a language translation table. The *Library Browse* button can be used to find and load all libraries that need to be translated.
2. Save the loaded libraries into a master translation table. This will save time from having to reload libraries for later translations.
3. Select a translation language from the drop down list.
4. Click the *Translate* button. This will begin the translation into the selected language.
5. Save the language translation table.
6. Review the warning box and translations. Make corrections as required.
7. The *Export* button will generate a CSV-formatted file that can be used for third-party reviews and corrections.
8. The *Import* button will import CSV files. Save the imported translations.

***Translating Libraries***

1. Using the *Translation Table* browse button, load the language file required.
2. Click on the *Resize* check box if the text is to be resized during translation.
3. Click the *Apply* button.
4. Enter the *From* and *To* library names.
5. Using the translated report, review the libraries and make any manual adjustments that may be required.
