Reputation: 1074
I always have to translate my applications to italian, and I did it several times but I can't make it work with CakePHP 3.0. This is what I did:
I extracted a .pot file through console's cake i18n. Uploaded it to poeditor and edited all of my strings Downloaded it to src/Locale/it/default.po as the manual (http://book.cakephp.org/3.0/en/core-libraries/internationalization-and-localization.html) says Checked that config/bootstrap had the right language set:
ini_set('intl.default_locale', 'it_IT');
As it didn't work, I tried with dumb things like renaming my folder to src/Locale/it_IT/default.po, src/Locale/ita/default.po, wrapped my .po file inside a LC_MESSAGES like it was with CakePHP 2.x... still no results.
Debug is set to true, so there should be no caching...
I know this is probably a dumb question, but i've past hours on this and still I can't get it working... what am I doing wrong?
Upvotes: 1
Views: 1193
Reputation: 1074
Sorry I got the problem and I'm really ashamed of that... The file was in the right position (src/Locale/it/default.po) and everything was set fine, but it didn't have read permissions for apache. Sorry!
Edit: This is an old question but I've had this same issue with a new CakePHP 4 project. Turns out that in this case Cake needs read and write permission in order to actually use those files. I hope this helps.
Upvotes: 6
Reputation: 2277
Try to go to your server and from the folder app/tmp/cache/view
, app/tmp/cache/model
and app/tmp/cache/persistant
delete the files you see in there. This is the cache your app is using.
Upvotes: 3