Startseite > howto > translate 
 en fr es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh zh_TW eo
Zurück  Weiter  Bearbeiten  Umbenennen  Rückgängig  Suchen  Verwaltung  
Dokumentation  
Achtung! Diese Seite wurde noch nicht übersetzt.  Siehe englische Version 
How To Translate A Gambas Project

1. Mark all strings that need to be translated

By default:

To mark a string to be translated, you must enclose it between braces:

Beispiel

PRINT "This string will not be translated"
PRINT ("This string will be!")

Strings that are to be translated are usually all text that the user will read.

Beware not to concatenate translated strings, because the order of words changes with the language. Use the Subst() instruction instead.

2. Do the translation

To do that, click on translate... in the Project menu.

If the IDE complains about msgmerge, make sure you have GNU gettext tools installed on your computer.

Translation Dialog

Then, select your translation language in the left list.

lang.png

If the translation is not present in the left list, click on the New button and choose a new translation.

If you need translating into a language that does not exist in the new translation ../../comp/gb.form/dialog, write me and I will add it.

Select an untranslated string in the table.

Select A String To Translate

Then enter its translation into the text field on the bottom of the ../../comp/gb.form/dialog.

String Translation

You can indicate that a string must not be translated by entering a single minus character as translated string.

Repeat this process until every string is translated. When you have finished, click on the Close button.

You can translate the project in several shots.

You can play with the toolbar icons.

Toolbar

From left to right, these icons allow you to:

There are other functions provided by the dialog box buttons:

button.png

From left to right, these buttons allow you to:

The translation are automatically saved when you change the current language or when you close the translation dialog box.

The result of your translation is stored in a *.po file stored in the .lang directory of the project. The name of this file depends on the language. For example, the french translation is named fr.po.

Each time you make a new version of your project, untranslated strings may change. But don't worry, your translated strings are preserved.

  • If an untranslated string disappears, the translation disappears with it.
  • If a new untranslated string is added, it gets a void translation.
  • All other untranslated strings keep their translation.