4
votes

How can I extract strings defined in the CakePHP core (like the auth component messages) with the cake i18n console?

I tried to run cake i18n extract with both the path to the app folder and the cake folder but this did not give me the cake core strings in the .pot file.

2
I have the same problem. Did you resolve it?tersmitten

2 Answers

5
votes

Core strings can be included when using the -paths option. This is an example call:

cake i18n extract -paths /path/to/app,/path/to/cake/libs/controller
0
votes

You have to run the desolat command ( with --paths and -paths). Then you have to generate the .po from the po file (use the tool poedit or, not suggested, edit by hand) to your Locale. For example, if you wanna an italian translation, you have to put cake.po in

 /app/Locale/ita/LC_MESSAGES/cake.po

Remember also that for non core strings (like month names), you have to generate a default.po file into the same folder.