Open rvanlaak opened 9 years ago
Hi, I think the fact to wrap the translation filters output should be done in your project according to the javascrit lib you want to use.
But we can provide a new url to save a translation for one locale (e.g. /translations/{id}/locale/{locale}
) in addition to the current one (that save all locales).
Hi, I think the fact to wrap the translation filters output should be done in your project according to the javascrit lib you want to use.
Wrapping a translation into a span is independent of Javascript right?
:+1: for the new url
Yes the span is independent of javascript but maybe some people will prefer use another tag or different attributes, so I prefer leave people wrap the translation as they want.
I agree on people deciding themselves how to wrap the translation, but do you have an idea how to do this? Is it something your bundle could solve?
It isn't related to Twig, otherwise the translations in the controller could not make use of the wrapping.
I think the fact of wrapping a translation into a span or any other html tag would be done by a Twig filter.
I should agree with you, if I should not make use of translations within my controller classes :+1:
It would be great if we could wrap the translator's output in a span, so we can edit translations from the view using http://createjs.org/
Already asked for it on StackOverflow about this, but there also should be some endpoint to save the new translation. Would your bundle allow to save translations from a XHR call?
http://stackoverflow.com/questions/31314427/wrap-translator-trans-and-transchoice-function-output-into-span