Language Setting to Kannada in Yii

Hi,

Any one help me, Can we create website in Kannada language using Yii framework?

Yes, you can.

The Definitive Guide to Yii - Internationalization

Thanks for the fast reply…

I tried to change in main config /protected/config/main.php - added sourceLanguage and language, ie:

‘sourceLanguage’ => ‘kn’,

‘language’ => ‘kn’,

But, am not finding any changes in language, it is showing in English only.

Can you please help me out, what is the steps for changing language and do we need any font files for setting regional languages?


'sourceLanguage' => 'en',

'language' => 'kn', // there's also 'kn_in' in Yii

Hi,

Even if i change ‘sourceLanguage’ => ‘en’, and ‘language’ => ‘kn’, we need to create file named “messages/kn/translation.php” right?

This Method will show the corresponding text added in "translation.php",

For EXAMPLE: if translatio.php contains

return array (

‘it works too’ => ‘To tez dziala’,

);

when we display, <?php echo Yii::t(‘translation’,‘it works too’) ?> then, it will display as ‘To tez dziala’. But this text is not in kannada lanugage…

I want to display entire site in kannada language… No idea how to do it… :(

Yes, that’s right, you need to create files under messages/kn folder.

You also need to set the Yii::app()->language parameter, one way to it is to set it in the controller’s init() method.