Added a new filter called i18n. This will allow this sort of thing:

  {% set translated_text = "foo"|i18n("es", "default_text") %}

  {{ translated_text }}