From c9c2c354231dc80c275f85ac7a0bea7e2cc4ae41 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 7 Jun 2023 11:52:17 +0100 Subject: [PATCH] Update README for translations --- {{cookiecutter.project_slug}}/locale/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/locale/README.md b/{{cookiecutter.project_slug}}/locale/README.md index 8377ee457..b2a8a0ef2 100644 --- a/{{cookiecutter.project_slug}}/locale/README.md +++ b/{{cookiecutter.project_slug}}/locale/README.md @@ -1,6 +1,6 @@ # Translations -Translations strings will be placed in this folder when running: +Start by configuring the `LANGUAGES` settings in `base.py`, by uncommenting languages you are willing to support. Then, translations strings will be placed in this folder when running: ```bash {% if cookiecutter.use_docker == 'y' %}docker-compose -f local.yml run --rm django {% endif %}python manage.py makemessages -all --no-location @@ -27,6 +27,6 @@ The production image runs `compilemessages` automatically at build time, so as l ## Add a new language -1. Update/add the [`LANGUAGES` setting](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-LANGUAGES) to your project's base settings. +1. Update the [`LANGUAGES` setting](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-LANGUAGES) to your project's base settings. 2. Create the locale folder for the language next to this file, e.g. `fr_FR` for French. Make sure the case is correct. 3. Run `makemessages` (as instructed above) to generate the PO files for the new language.