On Tue, Oct 6, 2009 at 11:39 PM, Steven Roussey <[email protected]> wrote:
>
> I've avoided it for a bit, but I saw a pluralize formatter, so figured
> that maybe it is time... how to translate templates between different
> languages.
>
> There is 1 book.
> There are 2 books.
>
> django reference:
> http://docs.djangoproject.com/en/dev/topics/i18n/
>
> Thoughts?
I haven't internationalized an app ever, but can't this be done with formatters?
trans my_var ->
{my_var|Trans|html} # Translated and then apply HTML escaping
blocktrans can be formatters on sections (not implemented yet, but we
discussed remember):
{.section foo|Trans}
foo bar {var}
{.end}
In the JSON you could include a top-level key:
"langugage": "en"
"langugage": "de"
And the Trans formatter will read this via the new 'context' arg.
I think if i18n can be done without adding any concepts to the
language, that would be awesome, and it looks like it can.
Andy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JSON
Template" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/json-template?hl=en
-~----------~----~----~----~------~----~------~--~---