Skip to content
Alexander Trufanov edited this page Mar 14, 2018 · 5 revisions

Scan Tailor uses Qt localization system to change UI language. It looks for translation files named "scantailor_xx.qm" where "xx" is a country code. The search is performed in several folders which are platform-specific. For linux it's "./share/scantailor-universal/translations" in "/usr/" or "/usr/local". For Windows it's an application folder.

How to build *.qm file for your language?

*.qm files are compiled translations files. First of all you need untranslated originals in English which have *.ts extension and could be found here. Currently these are scantailor_untranslated.ts and crashreporter_untranslated.ts. *.ts files are text documents (technically, xml documents) and could be edited in any text editor. Just replace text between tags and send it back to project maintainers. They'll add your *.ts file to project source code, build qm version and include it in next application distributive. If you are familiar with git application you may make a fork of the project and send a Pull Request to origin. Or just upload it somewhere and post a link as a new issue.

But a better approach would be to translate *.ts files with help of Qt Linguist tool from Qt framework. In this case you could compile them into *.qm files by yourself, copy them to Scan Tailor translations folder, select your language in application's settings and test them. Sometimes lines could be too long, etc.

Qt Linguist could be obtained from qttools5-dev-tools package for Linux machine or download its installer here for Win or Mac. (there is no official lightweight Qt Linguist redistributable as described here)

Detailed description could be could found in official Qt Linguist translator's manual.

Note: even if you can produce *.qm files by yourself, project maintainers will need translated *.ts sources instead. *.qm files are compiled by them while creation of the Scant Tailor distribution package.
Note: translation files from other versions of ST could be copied to ST Universal, and it will try to load them, but due to major changes in UI and names of controls it won't find a translation for most of its interface in them.

Note: Few controls like dialog buttons are not translated by application itself because they're a part of bigger Qt control. Thus they use Qt framework's localization files instead of ST localization files. To display them in your language too you'll need to find qtbase_xx.qm (where xx is your language code) file in Qt 5.6.x (or later) distributive and just copy it in /translations folder too. Don't bother with that if you're a Linux user. If you're contributing .ts file to project - project maintainer will do this for you.