From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Return Current System Language Using LabVIEW

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

Download All

Overview
Get the System Language of the OS via a kernel32.dll call, returning the value as HEX. 


Description
Get System Language.vi calls GetSystemDefaultLangID() to return a both a numeric and hex representation of the default system language.  This value may be compared with the table on this page.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download and unzip Language Hex Codes.zip.
  2. Run Get System Language.vi.

 

Additional Information or References
VI Snippet

00.png

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

Applications Engineer

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

Comments
Thoric
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

Note this uses the "GetSystemDefaultLangID", which returns the default language of the system, which is the language of the operating system at install time. This won't return the current language. For example, my system is set to UK, yet this returns US as the language. If instead you call the "GetUserDefaultLangID" function you get the actual current language of the logged in user.

Thoric (CLA, CLED, CTD and LabVIEW Champion)