Today we will learn about the concept of ” InterNationalization in CakePHP ” .
“InterNationalization” simply means if you are making an application and you wants to make that applications to reach a larger audience to cater for multiple languages.

To do this below are the steps-
Create a new CakePHP project:
Download the latest version from http://cakephp.org/.
Now to initialise the default and other languages just create a file global.php file in /app/Config/ , you may give your own name instead of global.php.
Put these lines of code in global.php.
<?php
$config['defaultLanguage'] = 'eng'; // Default Language
$config['availableLanguages'] = array('eng' => 'English', 'spa' => 'Spanish', 'ron' => 'Romanian', 'rus' => 'Russian', 'fra' => 'French'); // Available Languages
?>
Now load our global.php config file. In /app/Config/core.php add the following line at the end:
Configure::load('global');
Now creates an AppController which will support InterNationalization.
Open /app/Controllers/AppController and place the following lines of codes.
Put these lines of code in global.php.
<?php
$config['defaultLanguage'] = 'eng'; // Default Language
$config['availableLanguages'] = array('eng' => 'English', 'spa' => 'Spanish', 'ron' => 'Romanian', 'rus' => 'Russian', 'fra' => 'French'); // Available Languages
?>
Now load our global.php config file. In /app/Config/core.php add the following line at the end:
Configure::load('global');
Now creates an AppController which will support InterNationalization.
Open /app/Controllers/AppController and place the following lines of codes.
For full set of steps/ Code, Visit at: InterNationalization in CakePHP
FindNerd: Being an effective C, C#, Java ,
PHP forum here you can also post & look for various programming
queries along with their solutions including android, java, PHP questions and answers etc.

Comments