该内容不适用于您选择的语言

该内容将以另一种语言显示出来。 您可使用浏览器的翻译功能查看内容。

Localizing TestStand to Different Languages

Updated Apr 7, 2023

Environment

Software

  • TestStand

An introduction to how TestStand can be easily modified for a given language environment.

If TestStand developers or operators are more familiar with a language besides English, TestStand provides the flexibility to easily define different languages.  For instance, if a TestStand operator understands Spanish better than English, it might be preferable to modify the shipping definitions for English in order to account for additional languages.

TestStand stores all user viewable strings in resource string *.ini files in <TestStand>\Components\NI\Language\English\.  TestStand uses the definitions in these files to populate dialogs, menus, and even operator interface elements.  Since TestStand stores these resource strings using tags and constant name variables, you can easily modify any of these values to be reflected in TestStand.

Backup the Language Resource Strings

Note: The first thing to do before modifying any shipping elements is to copy the contents to the User directory (for instance, <TestStand>\Components\User\).
  1. Browse to <TestStand>\Components\NI\Language\English\.  Notice several ini configuration files here each with different areas of TestStand.
  2. Select the contents of the English folder (Edit»Select All) and copy the contents using Edit»Copy.
  3. Browse to <TestStand>\Components\User\Language\.
  4. Create a new folder (File»New»Folder) and give it a name specific to the strings it will contain (for example, Espanol).
  5. Open the Espanol folder and paste using Edit»Paste.

 

Identify the Element that You Want to Modify

Several different *.ini files help categorize the TestStand resource strings into several categories, grouped logically by different localization considerations.  For instance, one file contains all of the information for Operator Interface elements, which might be the only area of interest for English-speaking developers targeting operators with different languages.  Here's a break-down of the general structure for these configuration files.

Note: Between TestStand versions, some strings might have changed slightly, but backwards compatibility should be maintained.  For instance, additional files might reflect added functionality or additional modularity of strings.

UIControlOperatorInterfaceStrings.ini - Contains resource strings specific to the Operator Interface elements of TestStand, such as the menu items of the Full-Featured Operator Interface.  For instance, the menu elements of the Full-Featured Operator Interface can be modified in this file.  Not all Operator Interface elements are stored here.  See UIControlsStrings.ini.

UIControlStrings.ini - Contains resource strings used in the TestStand ActiveX UI controls, such as buttons, SequenceView controls, and the Open Sequence File Dialog.  For instance, the string "Resume" can be modified here.  Note that some elements in this file are used in the sequence editor as well, but the strings in this file are specific to the ActiveX controls used in Operator Interfaces.

TestStandExamples.ini - Contains resource strings used in TestStand shipping examples, such as the custom step type example for the HP 34401a.  For instance, the string "Configure HP34401a Step" can be modified in this file.  Not all examples use these definitions, but some elements can be modified here.

Units.ini - Contains resource strings used in localization elements, such as scales, measurements, and abbreviations.  For instance, the string "meter" can be modified in this file. This file is categorized by different areas such as Math, Physics, and Distance.

ModelStrings.ini - Contains resource strings used in the default process models (Sequential, Parallel, Batch).  For instance, the strings "Test UUTs", "Terminate", and "Enter UUT Serial Number" can be modified in this file.  This file is of special interest as it contains some of the most commonly used strings in TestStand.

NI_CommonTypesStrings.ini - Contains resources strings used in the common standard step types, such as Numeric Limit Test step.  For instance, when you click on a Pass/Fail step type, you have the option to "Edit Pass/Fail Source", which can be modified in this file. When editing a step, some dialogs and menus use these strings to configure the step.

NI_DatabaseTypesStrings.ini - Contains resources strings used in Database step types, such as DB Open.  For instance, the string "Build SQL Select Statement" can be modified in this file.

NI_SyncTypesStrings.ini - Contains resources strings used in Synchronization step types, such as Lock steps.  For instance, the string "Configure Lock" can be modified in this file.

NI_IviTypesStrings.ini - Contains resources strings used in IVI step types, such as IVI DMM steps.  For instance, the string "Arb Frequency" can be modified in this file.

ErrorStrings.ini - Contains resource strings used for the default error messages that TestStand displays in case of unhandled errors, such as if a DLL cannot be loaded.  For instance, the string "Invalid Path" can be modified in this file.

SequenceEditorStrings.ini - Contains resource strings used in the sequence editor, such as the differ tool.  For instance, the string "Station Globals" for the palette name can be modified in this file.  This file contains only the elements specific to the sequence editor only.

DialogStrings.ini - Contains resource strings used in dialogs, such as a message box.  For instance, the strings "OK" and "Login" (within the Login dialog) can be modified in this file.

EngineStrings.ini - Contains resource strings used in the Engine, such as step result status properties.  For instance, flow control ("Pre Expression") and adapter names can be modified in this file.

TestStandStrings.ini - Contains resource strings used generically throughout TestStand.  For instance, the string "Boolean" can be modified in this file.  If a property is common to all of the other categories, it might be found in this file.

Note:  When adding characters to the strings in these files longer such that the lines are longer than 512 characters, split them into several lines, each line less than 512 characters.  Use the same tag name for each line, followed by " LineNNNN"  where NNNN is the zero padded line number.  For instance,  a line might read "TagName Line0002 = "continued super long string that goes on and on and on and on and on and on and on and on and on and on and on ".
 

Setting TestStand to Use a Different Configuration

Once a folder is created in <TestStand>\Components\User\Language\, the folder is registered with TestStand as a valid language configuration.  Follow these steps to change TestStand's language setting:

  1. Open TestStand (Start»Programs»National Instruments TestStand X.X ).
  2. Go to Configure»Station Options.
  3. Select the Localization tab.
  4. From the Language drop-down, select the folder name that you created.
  5. Click OK and restart TestStand for the changes to take effect.

Note: The method above changes this setting manually.  As with most elements of TestStand, you can use the TestStand API to perform this action programmatically (for instance, you might want to do this if the Sequence Editor is not installed).  The property of interest for this setting can be found at Engine.StationOptions.Language.
 

Example of a Modification

In this example, we will modify the string "Test UUTs" to say "Prueba Unidades" (Spanish). 

  1. Browse to <TestStand>\Components\NI\Language\English\
  2. Select the contents of the English folder (Edit»Select All) and copy the contents using Edit»Copy.
  3. Browse to <TestStand>\Components\User\Language\.
  4. Create a new folder (File»New»Folder ) and name it Espanol.
  5. Open the Espanol folder and paste using Edit»Paste.
  6. Right-click on the file ModelStrings.ini and select Open With»Notepad (If Notepad is not available, select Choose Program in order to locate it).  Since Test UUTs is a process model entry point, we can find the string in ModelStrings.ini.
  7. Select Edit»Find to search for "Test UUTs".
  8. Find the TEST_UUTS string located in the [MODEL] category.
  9. Change the line from TEST_UUTS = "Test UUTs" to TEST_UUTS = "Prueba Unidades".
  10. Save the file (File»Save) and close Notepad.
  11. Open TestStand (Start»Programs»National Instruments TestStand X.X).
  12. Go to Configure»Station Options.
  13. Select the Localization tab.
  14. From the Language drop-down, select Espanol.
  15. Click OK and restart TestStand for the changes to take effect.
  16. Open a sequence file that uses a default process model (Sequential, Parallel, Batch) and select the Execute menu to notice "Prueba Unidades" in place of "Test UUTs".