Difference between #1 and #2 of
Entire Messages into javascript object

Revision #2 has been created by markux on Aug 24, 2012, 8:13:13 AM with the memo:

error syntax
« previous (#1)

Changes

Title unchanged

Entire Messages into javascript object

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

javascript, messages, i18n

Content changed

I needed the all messages with their translation into javascript. This is my solution: 1.- Extend CPhpMessageSource, creating MPhpMessageSource into protected/components :

```php
[...]
}
```
2
.- You add this to protected/config/main.php into components array:
[...]
```

3
.- You add this code into your view:



```php
<script type="text/javascript">
[...]
1 0
3 followers
Viewed: 7 322 times
Version: 1.1
Category: How-tos
Written by: markux
Last updated by: markux
Created on: Aug 24, 2012
Last updated: 5 years ago
Update Article

Revisions

View all history