Search code examples
phptranslationphp-gettext

How to maintain a system that uses php-gettext?


I developed a system using php-gettext library and following this tutorial. Everything worked normally and the exchange of languages is ok, but this system will undergo changes with time and new strings will emerge as well as other will leave the system.

How do I change when the main file .pot, I do not miss the existing translations in .po files?


Solution

  • I solved the problem by generating a .pot file in the same way when I created him. Then open the file .po (with translations) in PoEdit and used the menu "Catalog" > "Update from POT File". This function keeps the translated fields.