How to translate cakephp 3

Asked

Viewed 955 times

2

1 answer

1


So the translation takes place in a few steps and is not automatic need your intervention, I will try to take a step-by-step:

01 - at the root of your application run the command below to extract a file with all the texts that can be translated in the application:

bin/cake i18n

02 - If you have executed everything right by entering each step, the command will generate the catalog files (.POT) in the src/Locale folder , open these files with the POEDIT program and translate line by line.

03 - When you finish translating all lines save the file with the name src/Locale/pt_BR/default.po

Remarks:

If in the process you choose not to merge all domains the extract command will create two catalogs cake.pot (system messages) and the default.pot (messages from your Mvcs) will translate both. To conclude do not forget to set the Locale pt_BR in config/app.php , take advantage and also change the time zone from "UTC" to "America/Sao_paulo" in config/bootstrap.php and that’s it, translated application.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.