Search code examples
phpzend-frameworktranslation

Error in mo file with Zend Translate


I'm using Zend Translate on a project I'm working on, and from the last week or so, whenever I add a new string to the .po file, the scripts breaks giving the following error:

Warning: Unexpected character in input: '' (ASCII=1) state=0 in C:\www\web\application\languages\pt_PT\application.mo on line 132

But if I change the string that I want to translate to anything else, it starts working.

And if I add another string to translate, the file starts to work again.

I'm using Poedit to manage the translations, and the translations I'm inserting don't have any " or '.

Using the Validate tool in Poedit doesn't produce any errors.

Any thoughts?


Solution

  • This question it's to old but here is how I solved this.

    I have latest version of ZF1 1.12.20 (Discontinued). I tested everything but for me the solution was clean .po file by removing all “” especial quotes and \t characters in origin translation (English) and after that all works perfectly.