Search code examples
phplinuxcakephpinternationalizationpo

CakePHP 1.3.18 upgrade and locale/translations issue


I just updated an old CakePHP website (late 1.1 version if I recall correctly) to 1.3.18. After minor updates to the written code (it's mostly a CRUD website) everything works fine on my local machine (Win), but when I uploaded the updated site to the live server english translations broke.

There are two locales, Croatian (hrv) and English (eng), Croatian being the default. I've checked if the server might be missing installed locales, but "locales -a" returns both Croatian and English.

Translations from /app/locale/hrv/LC_MESSAGES/default.po are being loaded, but translations from app/locale/eng/LC_MESSAGES/default.po are being ignored.

After checking for proper directory/file permissions and proper letter cases I'm out of ideas. I don't understand why it works OK on my local machine and not on the live server.

Does anyone have any ideas?


Solution

  • Ah, should've read a bit more SO answers. The problem was CakePHP's caching folder, I just had to clear tmp/cache/persistent and tmp/cache/views files and let CakePHP read locale files again.

    A bit more info here: CakePHP cache i18n translate