Skip to content

Management Command

The traduire command batch-translates all modeltranslation fields.

Basic usage

# Translate all registered models
python manage.py traduire

# Translate a specific model
python manage.py traduire myapp.Article

# Multiple models
python manage.py traduire myapp.Article myapp.Category

Options

--source

Override the source language:

python manage.py traduire --source en

--targets

Translate to specific languages only:

python manage.py traduire --targets de,it

--overwrite

Overwrite existing translations (by default, only empty fields are filled):

python manage.py traduire --overwrite

--dry-run

Preview what would be translated without making changes:

python manage.py traduire --dry-run

Output:

  Would translate 42 myapp.Article instance(s)
  Would translate 12 myapp.Category instance(s)

Would translate 54 instance(s) total.