/ howto / translate
How To Translate A Gambas Project
To translate a project into your own language, open it in the IDE, and click on translate... in the Project menu. (If the IDE complains about msgmerge, make sure you have GNU gettext on your computer)

Then, select your translation language in the left list.

Note: If you need translating into a language that does not exist in the list, write me and I will add it.

Select an untranslated string in the table.

Then enter its translation into the text field on the bottom of the dialog.

| 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.

From left to right, these icons allow you to:

- Clear the current translated string.
- Mark a string as not translatable.
- Copy the untranslated string to the translated one.
- Verify the current translation, by checking that every symbol character is preserved.
- Find the next untranslated string.
- Find the previous untranslated string.
- Search a text inside the strings to translate, or the translated strings.

There are other functions provided by the dialog box buttons:

From left to right, these buttons allow you to:

- Insert a new translation in the left language list.
- Reload the current translation. All your changes are lost.
- Delete the current translation.
- Import and merge a translation file into the current one.
- Export the current translation to a file.

| 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.