Skip to content

Translatable ModelAdmin

Wagtail Localize supports translation of custom Wagtail's ModelAdmin registered models.


Add wagtail_localize.modeladmin to your INSTALLED_APPS:

    # ...

How to use

When registering your custom models you can use the supplied TranslatableModelAdmin in place of Wagtail's ModelAdmin class.

from wagtail.contrib.modeladmin.options import modeladmin_register
from wagtail_localize.modeladmin.options import TranslatableModelAdmin

from .models import MyTranslatableModel

class MyTranslatableModelAdmin(TranslatableModelAdmin):
    model = MyTranslatableModel


That's it! You can translate your custom ModelAdmin models in the admin dashboard the same way you would Wagtail snippets.