- The Bitcoin Core GUI can be easily translated into other languages
- We use Transifex to manage all translations (Bitcoin Project)
- The languages manifest file can be found at
- Translation source files are located in
.tsfiles are generated translation source files
.qmfiles are compiled binary translation files
- We use
bitcoin_en.tsas the translation master file (ie. all other languages use it as a template)
- For assistance, seek out tcatm, seone, Diapolo, wumpus or luke-jr (via IRC)
For managing all application translations, Bitcoin-Core makes use of the Transifex online translation management tool. Transifex is setup to monitor the Github repo for updates, and when code containing new translations is found, the Transifex index will process them. It may take several hours after a pull-request has been merged, to appear in the Transifex web interface.
Writing code with translations
We use automated scripts to help extract translations in both Qt, and non-Qt source files. It is rarely necessary to manually edit the files in
Translation source files must adhere to the following 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 source 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
gettext, 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
To automatically regenerate the
bitcoin_en.ts file, run the following commands:
cd src/qt/ make translate
contrib/bitcoin-qt.pro takes care of generating
.qm files from
.ts files. It’s mostly automated, and you shouldn’t need to worry about it.
Example Qt translation
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
Creating a pull-request
When an updated source file is merged into the Github repo, Transifex will automatically detect it (although it can take several hours). Once processed, the new strings will show up as "Remaining" in the Transifex web interface and are ready for translators.
To create the pull-request, use the following commands:
git add src/qt/bitcoinstrings.cpp src/qt/locale/bitcoin_en.ts git commit
Creating a Transifex account
Visit the Transifex Signup page to create an account. Take note of your username and password, as they will be required to configure the command-line tool.
You can find the Bitcoin translation project at https://www.transifex.com/projects/p/bitcoin/.
Installing the Transifex client command-line tool
The client it used to fetch updated translations. If you are having problems, or need more details, see http://docs.transifex.com/developer/client/setup
For Linux and Mac
pip install transifex-client
Setup your transifex client config as follows. Please ignore the token field.
nano ~/.transifexrc [https://www.transifex.com] hostname = https://www.transifex.com password = PASSWORD token = username = USERNAME
Please see http://docs.transifex.com/developer/client/setup#windows for details on installation.
The Transifex Bitcoin project config file is included as part of the repo. It can be found at
.tx/config, however you shouldn’t need change anything.
To assist in updating translations, we have created a script to help.
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
Do not directly download translations one by one from the Transifex website, as we do a few post-processing steps before committing the translations.
Handling Plurals (in source files)
When new plurals are added to the source file, it's important to do the following steps:
bitcoin_en.tsin Qt Linguist (included in the Qt SDK)
- Search for
%n, which will take you to the parts in the translation that use plurals
- Look for empty
English Translation (Singular)and
English Translation (Plural)fields
- Add the appropriate strings for the singular and plural form of the base string
- Mark the item as done (via the green arrow symbol in the toolbar)
- Repeat from step 2, until all singular and plural forms are in the source file
- Save the source file
Translating a new language
To create a new language template, you will need to edit the languages manifest file
src/qt/bitcoin.qrc and add a new entry. Below is an example of the english language entry.
<qresource prefix="/translations"> <file alias="en">locale/bitcoin_en.qm</file> ... </qresource>
Note: that the language translation file must end in
.qm (the compiled extension), and not
Questions and general assistance
The Bitcoin-Core translation maintainers include tcatm, seone, Diapolo, wumpus and luke-jr.
You can find them, and others, in the Freenode IRC chatroom.