internationalisation in django
I am doing internationalisation in django admin.I am able to convert all my text to the specific langauge.But i m not able to change the 'app' name
suppose
django-admin.py startapp test
this will create a app called test inside my project.Inside this app 'test' i can create many classes in my model.py file.But when i register my app 'test' in settings.py file.I am convert all the text in the locale of my browser but my app heading 'test' is not getting changed.How t开发者_开发知识库o change that any idea?
this is a well known problem in django and there is a ticket since 2006
a workaround for this would be to place all the appnames (with upper und lower-case) manually in your *.po-file.
to ensure django-admin will catch this, Replaced this:
<caption>
<a href="{{ app.app_url }}" class="section">
{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
</a>
</caption>
with this:
<caption>
<a href="{{ app.app_url }}" class="section">{% trans app.name %}</a>
</caption>
maybe this snippet would help too?
Defining an i18n-ized name, or any other custom app name is not natively possible.
Check out:
- Can you give a Django app a verbose name for use throughout the admin?
- http://code.djangoproject.com/ticket/3591
As mentioned in the question and ticket, there are several workarounds.
精彩评论