This manual requires a server environment, which matches the mandatory dependencies.
MySQL
Translate5 needs a own database with character set utf8. Connect to mysql
mysql -h localhost -u root -p
Then create the database, for example "translate5":
CREATE DATABASE IF NOT EXISTS `translate5` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Hostname
If you are using translate5 locally, you have to to specify a hostname for your local configuration.
Please add the following line to the /etc/hosts file, so that your browser can reach Translate5.
We assume "translate5.local" as hostname here.
127.0.0.1 translate5.local
Please ensure on pasting the above line, that between "127.0.0.1" and "translate5.local" is a TAB and not multiple spaces. In the latter case it is possible, that the name resolution does not work properly!
Configure translate5 apache vhost
Create the apache vhost config file
sudo touch /etc/apache2/sites-available/translate5.conf sudo chmod 660 /etc/apache2/sites-available/translate5.conf sudo ln -s ../sites-available/translate5.conf /etc/apache2/sites-enabled/translate5.conf
Edit the config file and paste the following content to it
<VirtualHost *:80> DocumentRoot "/var/www/translate5/public" ServerAlias translate5.local SetEnv APPLICATION_ENV application php_value include_path .:/var/www/translate5/library/zend/:/usr/share/php5:/usr/share/php <Directory "/var/www/translate5/public"> AllowOverride All Options Indexes FollowSymLinks Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>
Save the file.
If you use an already existing virtual host, please add at least the following both settings:
SetEnv APPLICATION_ENV application
php_value include_path .:/var/www/translate5/library/zend/:/usr/share/php5:/usr/share/php
Please be aware, that you have to check your webserver and this apache configuration regarding security, if you oppose your translate5 instance to the internet. Your security is your responsibility and can not be covered by this manual.
Restart apache
You have to restart apache to apply all changes made to configuration.
sudo /etc/init.d/apache2 restart
Download and install Translate5
First create a translate5 directory:
sudo mkdir /var/www/translate5
Download the Translate5 core package from
http://www.translate5.net/license/accept
save and unpack it directly in the above directory.
This can be done with the following commands:
cd /var/www/translate5 sudo wget http://www.translate5.net/downloads/translate5.zip sudo unzip translate5.zip
Since apache must be able to create files in the translate5 directory, the permissions have to be changed:
sudo chown -R www-data:www-data /var/www/translate5
Then run the Translate5 "installation and update" script as www-data user, follow the instructions in the script.
cd /var/www/translate5 sudo -u www-data ./install-and-update.sh
In the "Translate5 Installation" step the script will ask you for the database credentials.
If your database is set up as described in configuration from scratch, then all default values can be used.
The script asks also for the virtual host hostname, this must be the same hostname as specified above for the /etc/hosts file.
The example name "translate5.local" is also the default in the script.
Configure sending of mails in translate5
translate5 does send emails to users in different cases, e.g. when asking for a new password or on change of workflow status.
By default, sending of emails is deactivated, when using the translate5 installation-and-update-script. The reason for this is, that many users do not have an active mailserver on the machine, on which they want to test-install translate5.
If you have a mailserver running, please refer to the installation specific configuration options for information on how to configure translate5 mail sending.
openTMStermTagger Configuration
openTMStermTagger is not part of translate5, but translate5 builds on it to find and highlight terminology.
First some permissions has to be corrected:
sudo chmod 775 /var/www/translate5/application/modules/editor/ThirdParty/XliffTermTagger/startServer.sh sudo chmod 775 /var/www/translate5/application/modules/editor/ThirdParty/XliffTermTagger/stopServer.sh
The next step might not be necessary on most/some of the systems. If Oracle Java is not your only installed Java version you have to do the next step. In all other cases it is still recommended to avoid problems.
Open the file
/var/www/translate5/application/modules/editor/ThirdParty/XliffTermTagger/termtagger-server.conf
and change the following line
#JAVA_CMD=java
to
JAVA_CMD=/usr/lib/jvm/java-8-oracle/bin/java
Attention: This should be the path to your Oracle Java, if you did follow the translate5 Ubuntu installation manual. If you did install your Java in another location, you have to customize the path accordingly.
By default translate5 uses only one termTagger instance running on port 9001. For better performance for big data you can use as many termTagger instances as you want with one translate5 instance. If you want to do that, please ask for help at translate5 mailing list.
By default one termTagger instance uses 2500 MB memory. If you want to decrease or increase that, open the file
/var/www/translate5/application/modules/editor/ThirdParty/XliffTermTagger/termtagger-server.conf
and change the following line
TERM_TAGGER_MEMORY_USAGE=2500M
to another value (2500M equals 2,5GB of main memory; value is per termTagger instance)
After that openTMStermTagger can be started as normal user, by calling the startServer script:
sudo -u www-data /var/www/translate5/application/modules/editor/ThirdParty/XliffTermTagger/startServer.sh
To stop the server call the stopServer script accordingly.
You can also create a init.d script to ensure that the openTMSTermTagger Server is started automatically.
You are done
Open your browser and call http://translate5.local (or whatever hostname you have configured) and have fun with translate5.