Thomas
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
>> I have some problems with the translations of my website. Locally, it
>> works flawlessly. But as soon as I run the project on my server, it
>> won't translate. I've translated the project per app.
> Translation per app only works if you have the LocaleMiddleware
> installed.
> Maybe this setting is different on your server?
I know the per-app translations work without this. Mine works equally
with LANGUAGE_CODE and USE_I18N only on systems with "C" and "pl_PL".
There is no need to use LocaleMiddleware if you do not want to change
translations (eg. depending on browser settings).
--
We read Knuth so you don't have to. - Tim Peters
Jarek Zgoda, R&D, Redefine
jarek...@redefine.pl
}}}
I don't know if it is really need. But the documentation says so. Or I
read it to quickly and overlooked
something.
Thomas
Jarek Zgoda schrieb:
> I know the per-app translations work without this. Mine works equally
> with LANGUAGE_CODE and USE_I18N only on systems with "C" and "pl_PL".
> There is no need to use LocaleMiddleware if you do not want to change
> translations (eg. depending on browser settings).
>
>
--
> The last days I did my first i18n application and befor I read this:
> http://docs.djangoproject.com/en/dev/topics/i18n/
> {{{
> Application message files are a bit complicated to discover -- they
> need
> the LocaleMiddleware.
> If you don't use the middleware, only the Django message files and
> project message files will be processed.
>
> }}}
>
> I don't know if it is really need. But the documentation says so. Or I
> read it to quickly and overlooked
I thing something is wrong with docs then, because I'm speaking from
my practice. On my site I have few apps with per-app translations
(django-registration, django-confirmation and so on) and I have some
sitewide translations for my own code. The translation keys from 3rd
party apps appear in my own catalog but I left them untranslated there
(as they are already translated). If the things would work as
described, the strings from registration app would appear untranslated
because I do not have LocaleMiddleware installed. Of course, they
appear in Polish, as I expected.
That quoted section does seem to be inaccurate. The code that fetches
the translations is in django.util.translation.trans_real.translation()
and it always runs through settings.INSTALLED_APPS looking for locale
files.
I'm rewriting the i18n documentation at the moment, so I've made a note
to fix that confusion (that whole section is already basically just a
big FIXME at the moment anyway).
Regards,
Malcolm
Have you checked permissions? Does the webserver have permission to read
the files in question (including permission to access the directories
all the way the down to the files)?
Malcolm