CakePHP provides a powerful console shell to help you in the first steps of internationalizing your application. Addressing i18N is not an easy task, as there are many details to consider, such as dates and times, number and currency formats, dynamic content translation, and distinct dialects.
In this recipe, we're going to use the CakePHP I18n shell to prepare our application for translations with a simple flash message example.
First, we'll define a base language for our application. For this, we'll assume the base language will be English. All of your static content will then be displayed using any of the
Console/cake bake all Gift Console/cake bake all Recipient
Then, in your
app/Controller/RecipientsController.php file, add the following method: