so, now here´s a little tutorial for translating app-names throughout
the admin-interface:

1. define the app-names: I´m currently using the __init__-file of my
blog-application. it looks like this:

from django.utils.translation import ugettext_lazy as _

_(u'auth')
_(u'configuration')
_(u'comments')
_(u'flatpages')
_(u'sites')
_(u'Auth')
_(u'Configuration')
_(u'Comments')
_(u'Flatpages')
_(u'Sites')
_(u'Auth-Verwaltung')
_(u'Configuration-Verwaltung')
_(u'Comments-Verwaltung')
_(u'Flatpages-Verwaltung')
_(u'Sites-Verwaltung')

2. translation (see django-tutorial). my translation looks like this
(don´t forget upper/lowercase as well as the translation for "app
index"):

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE
package.
# FIRST AUTHOR <em...@address>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-03-05 07:45+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <em...@address>\n"
"Language-Team: LANGUAGE <l...@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: __init__.py:3
msgid "auth"
msgstr "Benutzer & Gruppen"

#: __init__.py:4
msgid "configuration"
msgstr "Konfiguration"

#: __init__.py:5
msgid "comments"
msgstr "Kommentare"

#: __init__.py:6
msgid "flatpages"
msgstr "Statische Seiten"

#: __init__.py:7
msgid "sites"
msgstr "Domains"

#: __init__.py:3
msgid "Auth"
msgstr "Benutzer & Gruppen"

#: __init__.py:4
msgid "Configuration"
msgstr "Konfiguration"

#: __init__.py:5
msgid "Comments"
msgstr "Kommentare"

#: __init__.py:6
msgid "Flatpages"
msgstr "Statische Seiten"

#: __init__.py:7
msgid "Sites"
msgstr "Domains"

#: __init__.py:3
msgid "Auth-Verwaltung"
msgstr "Benutzer & Gruppen (Übersicht)"

#: __init__.py:4
msgid "Configuration-Verwaltung"
msgstr "Konfiguration (Übersicht)"

#: __init__.py:5
msgid "Comments-Verwaltung"
msgstr "Kommentare (Übersicht)"

#: __init__.py:6
msgid "Flatpages-Verwaltung"
msgstr "Statische Seiten (Übersicht)"

#: __init__.py:7
msgid "Sites-Verwaltung"
msgstr "Domains (Übersicht)"

3. change app-names in index.html /// on line 18 replace {% blocktrans
with app.name as name %}{{ name }}{% endblocktrans %} with {% trans
app.name %}

4. change breadcrumbs in change_list.html /// on line 25 replace
{{ app_label|capfirst }} with {% trans app_label %}

5. change breadcrumbs in change_form.html /// on line 28 replace
{ app_label|capfirst }} with {% trans app_label %}

6. change app-names in app_index.html /// on line 11 replace {%
blocktrans with app.name as name %}{{ name }}{% endblocktrans %} with
{% trans app.name %}

7. change title in base_site.html /// on line 69 replace {{ title }}
with {% trans title %}

a bit over-complicated, but it works ... be sure to have all possible
translations within your translation-file (django.po)

thanks to everybody for your help,
patrick



On 6 Mrz., 15:39, patrickk <sehmasch...@gmail.com> wrote:
> you´re talking about the models name, not the applications name ...
>
> @nadya: with changing index.html the way you did it works for me as
> well.
> for changing the breadcrumbs (which obviously is a "must" if you
> change the app-names) you have to change change_list.html and
> change_form.html
>
> replace {{ app_label|capfirst }} with {% trans app_label %}
>
> in this case, you also have to provide the translations for app_label
> (lowercase).
>
> thanks,
> patrick
>
> On 6 Mrz., 14:56, Muslu Yüksektepe <musluyuksekt...@gmail.com> wrote:
>
> > i dont understand..
> > do u wanna mean your app name?
> > if u wanna tell about your app name in admin panel
>
> > i think u can use
>
> > *USE_I18N = True
>
> > in settings.py*
>
> >  and
>
> >    * class Meta:
> >         verbose_name_plural = "Your App Name"
>
> > in models.py*
>
> > try it and write me answer please
>
> > 2009/3/4 patrickk <sehmasch...@gmail.com>
>
> > > so far, it doesn´t seem possible to translate the app-names within the
> > > admin-interface, which results in a strange index-site with mixed
> > > languages.
>
> > > any updates on this issue? any ideas?
>
> > > thanks,
> > > patrick
>
> > --
> > Muslu YÜKSEKTEPE
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to