On Wed, Jun 16, 2010 at 01:00:36PM -0700, Aaron Lee wrote:
> def my_view(request):
>     sentence = 'Welcome to my site.'
>     output = _(sentence)
>     return HttpResponse(output)
> 
> (The caveat with using variables or computed values, as in the previous two
> examples, is that Django’s translation-string-detecting utility,
> django-admin.py makemessages, won’t be able to find these strings. More on
> makemessages later.)
> It's a bit confusing, one one hand it says Translation works on variables,
> on the other hand, it says makemessages won't be able to find these strings.

Yes, it will work if you happen to have a translation, and yes, it
doesn't say how to identify such strings for translation, because the
value of the variable may not be known at the time makemessages is run
(neither is it straightforward in cases where it could in theory be
calculated).

What kind of problem are you trying to solve?

With kind regards,
-- 
Baurzhan Ismagulov
http://www.kz-easy.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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