Hi,
I am unsure about the project level translations path, if they should be
found as well. I have added them manually to settings, but only that path.
Application paths get imported automatically.
Regards,
Andréas
2015-11-02 6:38 GMT+01:00 Sean Xu :
> Sorry,
>
>
Sorry,
~/django-swingtime/django-swingtime-master/demo should be the project path
where project level translation files were generated
under ~/django-swingtime/django-swingtime-master/demo/locale.
The project level locale files should also be recognized, right?
The application path should
be
Hi Sean,
That's interesting. You shouldn't have to add the locale paths explicitly.
Good that it's wokring, but as long as you put the locale files in a
directory named locale under each app and also under the project, it should
just work (as long as all apps are included in the config). Just
The translation for my template finally gets to work after I explicitly
have LOCALE_PATHS configured in settings.py!
Thanks very much for providing the hint :)
Actually the models and template come from different applications:
~/django-swingtime/django-swingtime-master/swingtime # Models
Hmmm
I'm a bit at a loss here. But does Django know where to find the .mo files?
Is it only your template that isn't getting translated, because you said
that the form itself is?
Regards,
Andréas
2015-10-30 12:45 GMT+01:00 Sean Xu :
> Now I have corrected the orders
Now I have corrected the orders of each Middleware class and removed the
duplicated SessionMiddleware:
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
Hi Andréas,
Thanks very much for providing the help.
Currently the middleware classes are configured like this:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
Hi,
Have you made sure that you have activated the languages you want in your
application?
Also, how is the current language being selected?
See:
https://docs.djangoproject.com/en/1.8/topics/i18n/translation/#how-django-discovers-language-preference
Regards,
Andréas
2015-10-30 7:45 GMT+01:00
Hi,
I'm learning Django Translation using django-swingtime with Django 1.7.9
installed.
I followed the official docs and embedded my string to translate with
{% trans "String to translate" %} in my Template and managed
to create both the po and mo files successfully.
But, the page is still
9 matches
Mail list logo