Translation HOWTO

Forums rules and VirtualBox FAQs
Post Reply
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Translation HOWTO

Post by Technologov »

Translation HOWTO

by Jeremy Grossmann (adapted for VirtualBox by Alexey Eromenko "Technologov")

VirtualBox makes use of the very powerful Qt framework for its graphical interface and translation management system. This is why you need to download an application called Qt Linguist in order to make a Qt compatible translation. Qt Linguist is available on several operating systems:

Qt Linguist on Microsoft Windows
On Windows you could download the complete Qt SDK but more than 300 MB is maybe a bit too heavy just for making a translation. This is why we provide a standalone version of Qt Linguist (about 7 MB).

Qt Linguist Mac OS X
Download the Qt SDK or a standalone version.

Qt Linguist on Linux (Debian/Ubuntu)
Install the Qt4 development tools to get Qt Linguist (e.g. sudo apt-get install libqt4-dev qt4-dev-tools)

Similar packages can be found on other Linux systems under different names.

Creating a new translation

If VirtualBox has not been translated into your language (please check on the Team page), then this section is for you.

First download the latest skeleton translation source (based on English) and open it with Qt Linguist.

Then set your language and optionally your country under “Translation File Settings” available from the Edit menu.

Finally, save the translation source as Lang_CODE.ts where CODE is replaced by the language and country codes.

The language code is a two-letter code (ISO 639-1) that you can find here.

A country code only needs to be specified if the translation is only for one country’s dialect of a language that is not the default dialect. The country codes are specified in ISO 3166-1. For instance Brazilian Portuguese language and country codes gives pt_br to replace CODE, for Portuguese in Portugal only the language code is required (pt).

Other examples:

French language for France: VirtualBox_fr.ts
Ukrainian language for Ukraine: VirtualBox_uk.ts
Portuguese language for Portugal: VirtualBox_pt.ts
Portuguese language for Brazil: VirtualBox_pt_BR.ts
Turkish language: VirtualBox_tr.ts
At this point you are ready to start translating, go to the translating section.

Updating an existing translation
To update an existing translation, you need to download the latest translation source (TS file) corresponding to your language. This file can been found on main code repository by using the following link with CODE replaced by the language/country code.

https://www.virtualbox.org/browser/trun ... ualBox/nls

VirtualBox_CODE.ts

Translating
If you wish to learn how to use Qt linguist, please read this One Minute guide. Other than that translating strings should be very intuitive.

Note: the “English” string in the MainWindow context must be translated into your language name like you spell it in your language because it is displayed in VirtualBox. For instance for the French translation, this string is translated to “Français”.

After you finish your job, you should post your translation in "vbox-dev" mailing-list, or in "VirtualBox OSE" forum

----
Original document for GNS3:
http://blog.gns3.net/2010/12/translation-howto/
The goal at GNS3 is to provide best integration possible with VirtualBox, translations included, so users will experience a unified, top-to-bottom integrated stack.
Post Reply