Suppose I have a example.php
file like that:
<p>
<?php echo _('Hello world') ?>
</p>
<p>
<b><?php echo _('the end') ?>
</p>
If I extract strings:
xgettext example.php
I get a messages.mo
file, that I can open with poedit
, translate, create a .po file, etc. That's ok, the problem is when I edit my original and already translated example.php
:
<p>
<?php echo _('Hello world') ?>
</p>
<p>
<?php echo _('new string') ?>
</p>
<p>
<b><?php echo _('the end') ?>
</p>
I've added a new string and if I execute xgettext
again I get a messages.mo
file where all strings are empty, so I have to use poedit and translate again all strings. How can I re-use my previous translations?