By Martin Stut, 2016-06-10

If you want to jump directly to the technical stuff, how to internationalize your AutoIt application and to download the code, go to https://github.com/martinstut/gettext_au3.
The blog post here is more about the background and reasoning why I did things the way I did them.

The Issue

While developing an AutoIT-based application for an international christian organization, the need came up to provide this application for users of different native languages. So MsgBox(64, "App Title", "Please reboot your computer to complete the process.") is no longer good enough. The application needs to present its user interface in a different language, depending on the user's preference.

Of course there are many approaches to implement this. But however you do it, you will need two different toolkits: one for the translator and one for the programmer.

The programmer will need something to define the translatable strings or, preferably, extract them from the source code.
The translator will need something to edit the translation.
The programmer will need something to incorporate the translation in to the program.

And all of this should be repeatable with little effort when a few strings in the program change - don't make the translator retranslate everything if you just add two strings for a new little feature of your program.

To avoid reinventing the wheel, I decided to go the route many large open source projects go: gettext.

A Solution: gettext

For a general overview of the GNU gettext system you can read https://en.wikipedia.org/wiki/Gettext . You can find detailed information about gettext in https://www.gnu.org/software/gettext/manual/index.html .

In a nutshell, gettext works like this:

Implementation for AutoIt

Gettext originated in a C-centric, fully compiling world, assuming a setup.exe program to install the product. But one of AutoIt's strengths is the ability to create a standalone executable, capable to run without installing (portable program). So it's better to include some compilable file rather than adding a .mo file per language to the distribution.

Here is how I set up the above gettext infrastructure for AutoIt: