Hi,

I would like to translate a django project, but my templates are very
verbose, so I would like to have a localized version of each template
file.

So I changed the basic "return render_to_response(...)" in my views by
the following code:

local_code = request.LANGUAGE_CODE or settings.LANGUAGE_CODE
local_template = '%s/%s' % (local_code, template)
return render_to_response((local_template, template), ...)

Is this a good design, or is there a better way to do the same ?

Thanks for your comments.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to