Example Code

Localizing Error Codes

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This VI demonstrates how to display a different error depending on the language spoken by the user of application.

 
Description
Here is a brief description of the example:

Someone recently asked me how they could display a different error depending on the language spoken by the user of the application. This simple example shows one possible way of doing this. An error cluster is made up of three elements:

Status - True means there is an error, false there is no error (doesn't require translation)

Error code - A number identifying the error (doesn't require translation)

Error source - Where the error occurred (requires translation)

Therefore, the only element of the error cluster that needs translated is the error source. A csv file is provided which contains sample "error sources" translated into four different languages. Note instead of error sources, I have just used simple words to make it easy to understand.

 

Requirements

  1. LabVIEW 2014 (or compatible)


Steps to Implement or Execute Code

  1. Specify the elements of the Array
  2. Run the application

 

Additional Information or References

VI Snippet

Error localization 2014 NIVerified.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Maria McKavanagh

FSE West London & Surrey
National Instruments UK & Ireland

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.