I cant seem to get Internationalization to work because there isn't a clear config example in the docs.
I can do
inside my config.php
And then translate some messages under framework/yii/messages/nl/yii.php, but then when I want to update yii this file is overwritten.
What I want is that it uses protected/messages/nl/yii.php
How do i accomplish this? No useful config example in the docs…
February 24, 2009, 10:48pm
Do not modify code under framework.
Because currently there’s no Netherland translation of those core messages, you will need to explicitly specify error messages in your validation rules (I guess that’s where you need it). Please refer to
I managed to "translate" the error messages of my forms. But i want to translate the framework messages too. Like "Please fix the following input errors:".
Even when the Dutch (nl) translation of the yii.php files comes out, i want to keep my own file, because sometimes the messages are too "technical".
Is there no way of translating the yii.php file outside of the framework directory?
February 25, 2009, 1:18am
You can customize the 'coreMessage' component which provides the core message translations. Below is the default configuration:
You may change the basePath to point to your application's messages folder.
February 25, 2009, 2:13am
The Yii::getPathOfAlias('application.messages') used in that cookbook article doesn't return anything in my config file, I get a blank basePath…
It gives the right path when I echo it in an controller/action though.
Got it working though, with:
'basePath' => 'protected/messages',
February 25, 2009, 12:33pm
I updated the cookbook article. We should not use 'application' alias because it is defined AFTER the config file is read.
im gathering information to apply the requirements implemented on my blog
where i used globalization and internationalization techquines
where can we get more information to apply what i have done in that site?
i’m starting a new project where im not gonna use
asp.net…i’ll use php and i’ve choose yii.
if blog demo app had a version with this requirements implemented it would be great.
remember that im not asking for a full implemented system, and just for a how to!
July 29, 2009, 9:13pm
I think you may read the following tutorial first: