Re: Translation from templates doesn't work.

2013-11-24 Thread Ramiro Morales
On Sun, Nov 24, 2013 at 4:21 AM, Shahar Or  wrote:
> String in my template don't translate. They stay English even though they do
> pop up in the po files using `makemessages`.

Do you comvert these -po files to .mo files using the compilemessages
Django command or the msgfmt GNU gettext utility?

Otherwise the translations wont be picked up.


-- 
Ramiro Morales
@ramiromorales

-- 
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+unsubscr...@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/CAO7PdF_eh5Qr_d_KbgaoaC2YCuu-q1M-qcAvQUTeLO59opohvA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Translation from templates doesn't work.

2013-11-24 Thread gilberto dos santos alves
please could you post url or some more details!

Em domingo, 24 de novembro de 2013 07h21min12s UTC, Shahar Or escreveu:
>
> 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.
>
>

-- 
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+unsubscr...@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/f6f83c68-ee92-4319-bae4-15b74de0916d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Translation from templates doesn't work.

2013-11-23 Thread Shahar Or
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.

-- 
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+unsubscr...@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.