Localization server is a server which continuously runs Serge and is configured to have proper access to your version control infrastructure. For example, for Git-based setups this means that you need to have Git properly configured there, with all the necessary public keys. If you decide to host a public-facing translation server software like Zing, it will typically be the same server.
For better security, we recommend to setup a separate user to run localization-related scripts on behalf of.
Assuming your server runs under Unix-based OS, and your Serge configuration files are stored in e.g. /var/serge/data/configs
folder (see Organizing your data), a bare-bones setup would be to create a simple wrapper script, /usr/local/bin/serge-endless-sync
, that will run the localization in an endless loop, like this:
#!/bin/bash
while :
do
# run the localization cycle (and rewrite the log)
serge sync /var/serge/data/configs >/var/log/serge.log 2>&1
# clean up orphaned translation interchange files (and append to the log)
serge clean-ts /var/serge/data/configs >>/var/log/serge.log 2>&1
echo "Waiting 10 seconds till the next cycle. Press [Ctrl+C] to stop..."
sleep 10
done
For testing purposes, you can run this script directly from the command line. In the actual production environment, you will need to run it as a daemon so that it starts automatically after system reboot. You may also want to add some log rotation instead of rewriting the /var/log/serge.log
file on each cycle.