tirenweb
tirenweb

Reputation: 31719

symfony: How to translate a text that contains <p></p>?

i want to translate this below:

<?php echo __(<<<EOM
<p>
For security reasons...
</p>
EOM
) ?>

So i create this translation unit:

<trans-unit>
<source>For security reasons...</source>
<target>Por razones de seguridad...</target>
</trans-unit>

The problem: it is not translated less than i remove the <p> </p> tags.

Any way to translate it keeping those tags?

Javi

Upvotes: 0

Views: 218

Answers (1)

2ndkauboy
2ndkauboy

Reputation: 9387

Why not only translating the string:

<p> 
<?php echo __("For security reasons...") ?>
</p>

Another solution would it be to include the <p> tags into the translation strings. I don't know the symphony translation technique but that is how it's done with gettext.

Upvotes: 1

Related Questions