Overview of the Translation Process
Most of the text that must be translated in an application consists of either single words or short phrases. These typically appear as window titles, menu items, tooltips, and labels to buttons, check boxes, and radio buttons.
The phrases are entered into the source code by the developer in their native language using a simple but special syntax to identify that the phrases require translation. The Qt tools provide context information for each of the phrases to help the translator, and the developer is able to add additional context information to phrases when necessary.
The release manager generates a set of translation files that are produced from the source files and passes these to the translator. The translator opens the translation files using Qt Linguist, enters their translations, and saves the results back into the translation files, which they pass back to the release manager. The release manager then generates fast compact versions of these translation files ready for use by the application.
The tools are designed to be used in repeated cycles as applications change and evolve, preserving existing translations and making it easy to identify which new translations are required. Qt Linguist also provides a phrase book facility to help ensure consistent translations across multiple applications and projects.
Translators and developers must address a number of issues because of the subtleties and complexities of human language:
- A single phrase may need to be translated into several different forms depending on context. For example, open in English might become öffnen, "open file", or aufbauen, "open internet connection", in German.
- Keyboard accelerators may need to be changed but without introducing conflicts. For example, "&Quit" in English becomes "Avslutt" in Norwegian which does not contain a "Q". We cannot use a letter that is already in use - unless we change several accelerators.
- Phrases that contain variables, for example, "The 25 files selected will take 63 seconds to process", where the two numbers are inserted programmatically at runtime, may need to be rephrased. The word order in the other language may be different, so the variables will have to be put in another place in the sentence.
The Qt translation tools provide clear and simple solutions to these issues.
Qt Linguist and lupdate are able to import and export XML Localization Interchange File Format (XLIFF) files, making it possible to take advantage of tools and translation services that work with this format. For more information on working with these files, see Translators.
© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.