Override default Django translations

前端 未结 4 1352
终归单人心
终归单人心 2020-12-01 13:37

I have a template with this:

{% trans \"Log out\" %}

This is translated automatically by Django to Spanish as Terminar sesión. How

4条回答
  •  独厮守ぢ
    2020-12-01 13:53

    The easiest way is to collect the .po file found in the django.contrib.admin locale folder and re-compiling it (you can use POEdit for doing so).

    You could also override the django.contrib.admin templates by putting them in your projects templates folder (for example: yourproject/templates/admin/change_form.html) then running makemessages from the project root (although this is no longer supported for django 1.4 alpha if i'm correct)

    edit: Robert Lujo's answer is the clean method

提交回复
热议问题