0
votes

How can I translate string containing colon in symfony2 using twig? Here's what I have:

Inside twig template:

{% trans with {'%order_no%': order_no} %}Loading offer: %order_no%...{% endtrans %}

Inside translation file:

Loading offer: %order_no%...: Įkeliamas užsakymas %order_no%...

As expected this doesn't work. How can I make it work?

1

1 Answers

3
votes

You need to use quotes around the text as such:

'Loading offer: %order_no%...': Įkeliamas užsakymas %order_no%...

edited to show the correct example.