I have installed trac on my server running Ubuntu 12.04. The problem is that the users cannot change the language in their preferences. Instead, the following message is displayed:

Translations are currently unavailable. Trac has been localized to more than a dozen of languages but in order to be able to use them, the Babel package needs to be present when installing Trac. See TracInstall for details.

The installation has been done using the repositories of Ubuntu, but I could not find any package related to trac and babel, nor trac and anything related to internationalization.

How can I install the translations for trac?


According to Trac On Ubuntu, you need to install Babel (exactly what's the error message states):

sudo apt-get install python python-babel
sudo apt-get install trac

One of the important things mentioned on the same page is:

Also take into account that python-babel should be always installed before trac if you wish to see it internationalized.

So, if after installing of python-babel on top of trac localization is still not in place, try to reinstall trac with:

sudo apt-get install --reinstall trac

And if still no result, most likely you'll need to purge both packages:

sudo apt-get purge python-babel trac

... and make a clean install of trac as per above.

  • I tried the purge & install procedure you describe but I still cannot change the language of Trac. Then I have done the upgrade of Babel and Trac using easy_install, as explained in TracOnUbuntu, with no success again. I am surprised that there would be an order on the installation of the package, I expect apt to manage this. – julien May 24 '12 at 5:35
  • I'm not sure, but perhaps you need to destroy Trac database as well, and reinstall? Don't forget about backup :) – Andrejs Cainikovs May 24 '12 at 12:46
  • I doubt it would be related to the database because I have just created a new project with initenv, and it is also English only. Maybe the translations are not packaged in Ubuntu? – julien May 24 '12 at 18:35
  • Have no idea - according to the Trac site they are. – Andrejs Cainikovs May 24 '12 at 19:49

It's a packaging bug. Presently, trac package (I've checked 0.12.2-1 on oneiric and 0.12.2-1build1 on precise) does not include localization files.

$ dpkg -L trac | grep /locale/ | wc -l

See Debian bug #644401 for further details.

For a time being, while the new version propagates to Ubuntu repositories (bug the maintainers), I'd suggest using Debian or Ubuntu Quantal package 0.12.3+, for which the issue is resolved. The following worked for me:

$ wget http://ftp.debian.org/debian/pool/main/t/trac/trac_0.12.3-1_all.deb
$ sudo dpkg -i trac_0.12.3-1_all.deb
$ dpkg -L trac | grep /locale/ | wc -l

(I believe it's better to put your Trac offline while the package is upgraded.)

I've filed an Ubuntu bug #1016237 on this subject, see the linked Launchpad bug page for its status.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.