User Rating:  / 0

Multilingual Framework For MASM Programs & Projects

Recently, I developed a small program called TwonkyTray, and after releasing it I had a request, by a forum member on the QNAP forum where i announced it, to include German language as an option.

Of course i was delighted to get some feedback and a request for a new feature, and begin looking for a way to include this in my program without having to rewrite too much.

So i checked a few forums and asked how one would go about adding this feature to a program? did RadASM have something built in that i wasn't aware of that might help? etc. I got a private message from jj2007 at the masm32 forums which helped point me in the right direction and allowed me to formulate the beginning of my Multilingual framework for masm programs and projects.

The Multilingual Framework

At its core, the Multilingual framework consists of 3 main files:

  • Multilingual.asm
  • Languages\Language.asm

In addition there are number of other files for each language supported, all stored in a Languages subfolder, and all named after the respective countries short code: EN.asm, DE.asm, PL.asm etc etc.


This contains the main functions required to register a new language for a particular dialog

Contains definitions for the languages used and structures used in the main multilingual functions.


Contains all your .data variables but without any string data, these are stored in the individual language files. All variables in language.asm are assigned a buffer of data large enough to accomondate the longest string reference for any language used.

The specific language files contain the actual strings, for each language, which are copied to the main data variables when the initialize or refresh procedures are called.

Of course with different languages, word and sentence length is different, so you must take this into account when assigning the size of the data buffer for your variable, otherwise your program would crash due to a buffer overflow when the string data is copied to the main data variable.

The overview image shows how the main files are symbolically linked together to give your project multilingual status.

Category: Win32 Assembler

Login Form