Difference between #1 and #2 of
How to customize Yii core messages?

Revision #2 has been created by qiang on Feb 25, 2009, 12:31:38 PM with the memo:

replaced alias with actual directory in basePath property
« previous (#1) next (#3) »

Changes

Title unchanged

How to customize Yii core messages?

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

[...]
return array(
......
'language'=>'de',
'components'=>array(
'coreMessages'=>array(
'basePath'=>
Yii::getPathOfAlias('application.'protected/messages'),
),
......
[...]
```

In the above, we specify that the application is targeted to German users and
 the translated messages are located under the directory aliased as `application.messages`. In a default setting, the path alias would refer to the directory `protected/messages`.

Next, we need to provide our translations. Under the directory `protected/messages`, create a subdirectory named `de` which corresponds to the target language we set in the application configuration. And under the `de` directory, create a new file named `yii.php`. To this end, we should have the following directory structure:

~~~
WebRoot/
[...]
17 0
17 followers
Viewed: 55 043 times
Version: 1.1
Category: Tutorials
Written by: qiang
Last updated by: Yang He
Created on: Feb 25, 2009
Last updated: 5 years ago
Update Article

Revisions

View all history