The goal of this page is to show you how to set up WebGUI's translation server for fixing bugs or implementing RFEs. Instructions were developed for setting up the translation server with a source install of WebGUI. But running it inside the WRE is equally possible
The following instructions assume that you have a checkout of the tools branch and that you are executing them as root. Tools can be checked out via svn and are located under https://svn.webgui.org/plainblack/tools or manually using the web-frontend available through the same URL.
Add a new domain to the /data/domains directory:
mkdir /data/domains/translation.localdomain
chown apache:apache /data/domains/translation.localdomain
cd /data/domains/translation.localdomain
Note that files do not necessarily have to belong to the apache user. Which user is appropriate depends on the configuration of your server. Just make sure the cgi script will have write access to language files later on.
Put a copy of the translation server script into this new directory.
cp /from/whereever/translationserver.cgi ./translationserver.cgi
Edit the file and change line 15:
my $wgi18neditRoot = "/data/domains/translation.localdomain/";
to
my $wgi18neditRoot = "/data/domains/translation.localdomain/";
Otherwise the script will terminate with an error message saying that it cannot find the configuration file.
Make directories to hold the config file and the translated languages
mkdir etc
mkdir languages
chown apache:apache etc languages
chmod g+s etc language
Optionally, check out language files via svn using the following line
cd language
svn co https://svn.webgui.org/plainblack/translations/<Language>
You can use the web-frontend to find out which languages are available.
Download a copy of the i18n.conf file from this article, adjust it to suit your install, and put it into the etc/ directory.
cp /from/whereever/i18n.conf etc/i18n.conf
chown apache:apache i18n.conf
vim i18n.conf
Take care of DNS so that you can access the translation server. On my server, this is done in the hosts file.
vim /etc/hosts
127.0.0.1 translation.localdomain translation
Configure Apache to respond to requests for that server:
Add the following section to your httpd.conf file (or whatever it is called in your distribution). If you are using the wre, create a file translation.localdomain.modproxy under /data/wre/etc and fill it with the content below.
<VirtualHost *:80>
ServerName translation.localdomain
ServerAlias translation
DocumentRoot /data/domains/translation.localdomain
Alias /extras /data/WebGUI_HEAD/www/extras
<Location />
DirectoryIndex translationserver.cgi
AddHandler cgi-script .cgi .pl
Options +ExecCGI +Indexes
</Location>
</VirtualHost>
Restart your server so Apache can pick up the new configuration
service httpd restart
or
. /data/wre/sbin/setenvironment.sh
wreservice.pl --restart web
when using the wre
Final notes:
Keywords: i18n server translation