Skip to content

Admin Integration

django-traduire provides a mixin that adds translation actions to the Django admin.

Setup

from django.contrib import admin
from modeltranslation.admin import TranslationAdmin
from django_traduire.admin import TraduireMixin

@admin.register(Article)
class ArticleAdmin(TraduireMixin, TranslationAdmin):
    pass

Available actions

The mixin adds two actions to the admin changelist:

  • Translate empty fields — fills only empty translation columns
  • Translate all fields (overwrite) — retranslates everything, replacing existing translations

Usage

  1. Go to the admin changelist for your model
  2. Select the instances you want to translate
  3. Choose one of the translate actions from the action dropdown
  4. Click "Go"

The action shows a success message with the count of translated instances.