Translation from templates doesn't work.
String in my template don't translate. They stay English even though they do pop up in the po files using `makemessages`.
To make sure that the current `lang` is indeed what I expect it to be, I use `{{ lang }}` in the template somewhere.
I have `{% load i18n %}` in the template somewhere near the top. Does the order matter?
I have `USE_I18N = True` and
```
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.i18n',
'django.core.context_processors.request',
'django.core.context_processors.media',
'django.core.context_processors.static',
'cms.context_processors.media',
'sekizai.context_processors.sekizai',
'bidiutils.context_processors.bidi',
)
```
I restart the server and still I get no translation.
I don't know whether translation from code such as views works because I didn't code any views. i'm only using `django-cms` and in it's scope translation does seem to work because it's interface gets translated and I do get the pages in the language that I expect.
-- To make sure that the current `lang` is indeed what I expect it to be, I use `{{ lang }}` in the template somewhere.
I have `{% load i18n %}` in the template somewhere near the top. Does the order matter?
I have `USE_I18N = True` and
```
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.i18n',
'django.core.context_processors.request',
'django.core.context_processors.media',
'django.core.context_processors.static',
'cms.context_processors.media',
'sekizai.context_processors.sekizai',
'bidiutils.context_processors.bidi',
)
```
I restart the server and still I get no translation.
I don't know whether translation from code such as views works because I didn't code any views. i'm only using `django-cms` and in it's scope translation does seem to work because it's interface gets translated and I do get the pages in the language that I expect.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/94d50ee1-44fb-4ceb-943d-8b39b04333ef%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home