Reputation: 93
I have a problem with exposing translations in Symfony2.
For example:
<p>{{ 'You haven\'t confirmed email address yet. We can\'t inform you }}</p>
in message.en.yml:
'you haven''t confirmed email address yet':
' We can''t inform you':
I want that dot(.) behave as normal dot, not like this. How to escape this character?
Upvotes: 0
Views: 450
Reputation: 26
This problem exists when you use "Translation Component on steroids" - JMS Translation Bundle as it supports level nesting while generating YML files. Dot is used to do that and cannot be escaped (I haven't found such possibility so far).
Probably the only solution is to disable level nesting. Unfortunately, modification of one line in the bundle will be needed.
Open JMS\TranslationBundle\Translation\Dumper\ArrayStructureDumper.php
and change line 26:
private $prettyPrint = false;
or use setPrettyPrint(false)
function directly.
Upvotes: 1