Help:Extension:Translate/Translation memories

This page documents how to setup local translation memory with the aid of tmserver from translatetoolkit. You will need to have a sqlite support enabled in PHP.

First we need to install (or just extract) translatetoolkit. It can be downloaded from, choose the latest release (not the big green button). Then extract the package to somewhere, preferable outside of the web document root.

Now we need to create an empty database. In command line go to the extracted folder and type the following commands. The second command throws an error but it should create a tmdb.sqlite file. Script the first line if you have installed the package already by other means and the prefix to the second command also.

You can use sqlite3 command to check that the database is initialised correctly:

You can now move the database file to suitable place. You need to setup the permissions in a way that the database can be accessed by both the webserver and yourself. This means that also the parent directory must be writable to the both.

Then configure the database file with the examples given in Translate.php. Now you can bootstrap the translation memory with existing translations by running tm-export.php under scripts folder in Translate extension.

Lastly, don't forget to start up the translation memory server itself. Here is an example script. You can use cron or init files to start it up automatically with the system itself. We lack proper init script, so if you can make one it would be appreciated. Of course replace the port and path to reflect your configuration. Change 0.0.0.0 to 127.0.0.1 if you don't want to make the server publicly accessible (the database must be on the same host as the server itself currently). Again you can skip the path to the command if you have installed the toolkit.

The database is updated with new translation immediately when they are made - if everything is working and the webserver has write permissions to the database.