Installing on macOS¶
Weblate should run on all contemporary hardware without problems, the following is the minimal configuration required to run Weblate on a single host (Weblate, database and webserver):
2 GB of RAM
2 CPU cores
1 GB of storage space
The more memory the better - it is used for caching on all levels (filesystem, database and Weblate).
Many concurrent users increases the amount of needed CPU cores. For hundreds of translation components at least 4 GB of RAM is recommended.
Actual requirements for your installation of Weblate vary heavily based on the size of the translations managed in it.
Install the dependencies needed to build the Python modules (see Software requirements):
brew install pango libjpeg python git libyaml gobject-introspection pip3 install virtualenv
Make sure pip will be able to find the
libffi version provided by homebrew
— this will be needed during the installation build step.
Install wanted optional dependencies depending on features you intend to use (see Optional dependencies):
brew install tesseract
Optionally install software for running production server, see Running server, Database setup for Weblate, Background tasks using Celery. Depending on size of your installation you might want to run these components on dedicated servers.
The local installation instructions:
# Web server option 1: NGINX and uWSGI brew install nginx uwsgi # Web server option 2: Apache with ``mod_wsgi`` brew install httpd # Caching backend: Redis brew install redis # Database server: PostgreSQL brew install postgresql
We’re using virtualenv to install Weblate in a separate environment from your system. If you are not familiar with it, check virtualenv User Guide.
Create the virtualenv for Weblate:
virtualenv --python=python3 ~/weblate-env
Activate the virtualenv for Weblate:
Install Weblate including all dependencies:
pip install Weblate
Install database driver:
pip install psycopg2-binary
Install wanted optional dependencies depending on features you intend to use (some might require additional system libraries, check Optional dependencies):
pip install ruamel.yaml aeidon boto3 zeep chardet tesserocr
Following steps assume virtualenv used by Weblate is active (what can be
. ~/weblate-env/bin/activate). In case this is not true, you will
have to specify full path to weblate command as
Copy the file
Adjust the values in the new
settings.pyfile to your liking. You can stick with shipped example for testing purposes, but you will want changes for production setup, see Adjusting configuration.
Create the database and its structure for Weblate (the example settings use PostgreSQL, check Database setup for Weblate for production ready setup):
Create the administrator user account and copy the password it outputs to the clipboard, and also save it for later use:
Start Celery workers. This is not necessary for development purposes, but strongly recommended otherwise. See Background tasks using Celery for more info:
Start the development server (see Running server for production setup):
Congratulations, your Weblate server is now running and you can start using it.
You can now access Weblate on
Login with admin credentials obtained during installation or register with new users.
You can now run Weblate commands using weblate command when Weblate virtualenv is active, see Management commands.
You can stop the test server with Ctrl+C.
Open the admin interface (
http://localhost:8000/create/project/) and create the project you want to translate. See Project configuration for more details.
All you need to specify here is the project name and its website.
Create a component which is the real object for translation - it points to the VCS repository, and selects which files to translate. See Component configuration for more details.
The important fields here are: Component name, VCS repository address and mask for finding translatable files. Weblate supports a wide range of formats including gettext PO files, Android resource strings, iOS string properties, Java properties or Qt Linguist files, see Supported file formats for more details.
Once the above is completed (it can be lengthy process depending on the size of your VCS repository, and number of messages to translate), you can start translating.