The Qt GUI can be easily translated into other languages. Here’s how we handle those translations.
This file takes care of generating
.qm files from
.ts files. It is mostly
This file must be updated whenever a new translation is added. Please note that
files must end with
<qresource prefix="/translations"> <file alias="en">locale/bitcoin_en.qm</file> ... </qresource>
This directory contains all translations. Filenames must adhere to this format:
bitcoin_xx_YY.ts or bitcoin_xx.ts
src/qt/locale/bitcoin_en.ts is treated in a special way. It is used as the
source for all other translations. Whenever a string in the code is changed
this file must be updated to reflect those changes. A custom script is used
to extract strings from the non-Qt parts. This script makes use of
so make sure that utility is installed (ie,
apt-get install gettext on
Ubuntu/Debian). Once this has been updated, lupdate (included in the Qt SDK)
is used to update bitcoin_en.ts. This process has been automated, from src/qt,
When new plurals are added to the source file, it’s important to do the following steps:
%n, which will take you to the parts in the translation that use plurals
English Translation (Singular)and
English Translation (Plural)fields
An updated source file should be merged to github and Transifex will pick it up from there (can take some hours). Afterwards the new strings show up as “Remaining” in Transifex and can be translated.
To create the pull-request you have to do:
git add src/qt/bitcoinstrings.cpp src/qt/locale/bitcoin_en.ts git commit
We are using https://transifex.com as a frontend for translating the client.
The “Transifex client” (see: http://support.transifex.com/customer/portal/topics/440187-transifex-client/articles)
will help with fetching new translations from Transifex. The Transifex configuration (
is part of the repository.
It is also possible to directly download new translations one by one from the Transifex website.
tx pull -a
src/qt/bitcoin.qrcmanually or via
ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/<file alias="\2">locale\/\1.qm<\/file>/'
src/qt/Makefile.ammanually or via
ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/ locale\/\1.ts \\/'
git addnew translations from