Installing Fonts and Character Sets
Complete the following steps to ensure that the proper fonts and character sets are on your development computer. These directions assume you are running Windows 7.
- Open the operating system Control Panel and select Region and Language.
- Select the Administrative tab. In the Language for non-Unicode programs section of the Administrative tab, select the Change system locale button.
- In the Region and Language Settings dialog box, select the language you want to translate your application to and click OK.
- Select the Keyboards and Languages tab and then click the Change Keyboards button to open the Text Services and Input Languages dialog box.
- In the Text Services and Input Languages dialog box, click the Add button to open the Add Input language dialog box.
- In the Add Input language dialog box, select the language you want to translate your application to from the Input language drop-down list.
Creating a Language Resource File
Complete the following steps to create a language resource (.lwl) file and use the .lwl file in a LabWindows/CVI project.
- In LabWindows/CVI, select Tools»User Interface Localizer to launch the CVI GUI Localization Utility.
- With the utility open, select <Alt-Shift> to cycle through the languages available on your computer and select the language you want to translate your application to. By default, the languages appear in your desktop toolbar. If you are using a multibyte language, you also must select <Alt-`> to open the Input Method Editor (IME).
- In the utility, select File»Open User Interface to load the .uir file you want to translate.
- For each user interface item, enter a local language string in the Local Language control.
- Select File»Save Localization to export to a .lwl file.
- In your source code, call LocalizePanel, which is available in \toolslib\localui\localui.fp. Insert this function after LoadPanel and before DisplayPanel.
Translating the Run-Time Message File
You must translate the run-time message file if you want run-time dialog boxes, such as the File Open dialog box, to be translated. Complete the following steps to translate the run-time message file.
- Create a copy of the msgrte.txt file that is located in the \bin directory of the run-time engine installation directory. The run-time engine installation directory is typically \Windows\system32\cvirte for 32-bit systems, \Windows\SysWOW64\cvirtefor 32-bit components on 64-bit systems, and \Windows\system32\cvirte for 64-bit components on 64-bit systems). Name this copy using a language-specific name, such as msgrte_russian_draft.txt. (Note: The remainder of this procedure will use msgrte_russian_draft.txt to refer to the new file.)
- Use a text editor to modify msgrte_russian_draft.txt. Translate only the text that is inside quotation marks. Do not add or delete any message numbers.
- Use the following commands to run countmsg.exe, which encodes msgrte_russian_draft.txt for use with the run-time engine and renames the new message file. countmsg.exe is located in the \bin directory of the LabWindows/CVI installation directory. (The LabWindows/CVI installation directory is typically C:\Program Files\National Instruments\CVInn.)
countmsg msgrte_russian_draft.txt msgrte_russian.txt
Building a Distribution
Complete the following steps to build a distribution of your localized application.
- Select Build»Distributions»Manage Distributions to open the Manage Distributions dialog box.
- In the Manage Distributions dialog box, click New, and then click OK to open the Edit Installer dialog box.
- Select the Files tab. In the Local Files & Directories option, browse to the folder containing the .lwl file you saved previously.
- Select the .lwl file and click the Add File button.
- In the Advanced tab, enable the Install LabWindows/CVI Shared Run-Time Engine custom message file in the application directory: Directory option and browse to the path for msgrte_russian.txt.
- Click OK to close the Edit Installer dialog box.
- Select Build»Distributions»Build Project.