Language Actions Plugin

This tiny actions plugin (just 90 KB for Lua 5.1) allows you to determine the language of the operating system your application is running on. The action return a table with the Language ID codes as used in AutoPlay Media Studio or Setup Factory.

The default action System.GetDefaultLangID() returns the primary and secondary language as adjusted in the "Current language for non-Unicode programs" setting, the system locale, found in the Control Panel, under Region and Language > Administrative:

This plugin complements the former action, adding two new functions to check for the original language of Windows when it was installed (the "install language"), and the current display language, if a language pack was applied and is selected for the current user.

As you can see, the display language (used for the interface) may be different to the current language for non-Unicode programs, in other words, the system locale may be different from the Windows display language, because a multilingual user interface pack (MUI) or a Windows language pack (LIP) was applied:

This sample shows that the regional settings are adjusted for Brazilian Portuguese (primary language id 22, secondary language id 1), however the display language is US-English (primary language id 9, secondary 1).

This other sample shows that the regional settings are adjusted again for Portuguese (22), the original installation language of Windows was English (9), and the language currently being used for the user interface is German (primary language id 7, secondary language 1). It is up to you to decide which of the three available language codes should be used to determine which language to use in your application.

It is required to set the system locale to the same language of the text you are attempting to show in Input fields, Comboboxes or Listboxes. These Windows controls may not show the captions correctly if the display language and system locale are using different charsets. For example, using a system locale of 9 (English) and a display language set to 25 (Russian) does not work, as these languages are not using the same charsets (one uses Cyrillic, the other the Western alphabet). To avoid this kind of problem, System.GetDefaultLangID() use the system locale, and not the installation or display language.


To receive a download link for this software, please click the button below. After the payment is confirmed, you will receive a download link per email automatically and may install this software, use it for commercial and personal projects.

In the past, I offered my work for free, in the hope that individuals and companies would contribute with a minimum payment. Unfortunately, that didn't happen, and the result was so meager, that I didn't even pay half the cost of hosting this site, and I had to change the policy.

Support Policy

All software products were tested and found to work, but they are provided without any explicit guarantee that they will work in every possible environment without further customization. If you need support or consulting, please contact me.