Code to start translation for Qt code

    qApp->installTranslator( translator );

Steps to create or compile a new translation

Preparation steps in source code Each source file which uses the QT translation macros must be listed in the project file <HBASICDIR>/translate/
Insert new translation language in translation list in this file
TRANSLATIONS = hbasic_de.ts

Prepare <language.ts> file with "make prepare" in translation directory.

Edit file or start $QTDIR/bin/linguist  and load file from translate directory to edit translation for new language.

Create translation object file.

Prepare Hbasic for a new translation

Insert new line into install_dir/


Each translation needs 3 entries in a separate line

make install

How to translate HBasic strings

Insert tr(x) or QObject::tr(x) for every text x in a sourcefile *.cpp

Edit project file in <HBASICHOME>/translate/
   insert a reference to all *.h and *.cpp files in the project.

Execute "make prepare" in <HBASICHOME>/translate to create *.ts file for each language

Edit *.ts file with program linguist from Qt or manually

Execute make in translate directory

Execute "make install" or copy new lang.qm file to /usr/local/hbasic/translation directory.

Insert new languages into HBASICHOME/install_dir/