I'm asking if it's possible to use translations in Symfony2 as, for example, sprint_f()
PHP functions does. By using sprint_f()
is so easy as:
$message = 'Are you sure to delete the %element%?';
echo sprintf($message , "element_name");
And the output will be: "Are you sure to delete the element_name?", that's easy. Now I have the translation file in YML format and I wrote this:
delete.message: Are you sure to delete the %element%?
But this will work? I check docs here and here but since I'm using BazingaJSTranslationBundle I don't know how to get this working on this scenario. Any help or advice?