Difference between #13 and #14 of
How to translate and do the translations the easy way

Changes

Title unchanged

How to translate and do the translations the easy way

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

i18n language translate messages t Yii::t CApplication CMessageSource CModel gii ISO639

Content changed

[...]
_Optionally_, if you want to make use of empty translation strings,
then you can modify **[`translateMessage()`](http://www.yiiframework.com/doc/api/1.1/CMessageSource#translateMessage "API | CMessageSource :: translateMessage( )")** method in **[`CMessageSource`](http://www.yiiframework.com/doc/api/1.1/CMessageSource "API | CMessageSource")** class to comment out empty string check.

**NB! Remember this when you upgrade your Yii distribution!**

In the file **`framework/i18n/CMessageSource.php`**, line **`104`** ([Yii version 1.1.1
67](https://github.com/yiisoft/yii/blob/1.1.167/framework/i18n/CMessageSource.php#L104 "Source | CMessageSource.php")):



```php
if(isset($this->_messages[$key][$message]) /*&& $this->_messages[$key][$message]!==''*/)
[...]
16 2
17 followers
Viewed: 88 146 times
Version: 1.1
Category: How-tos
Written by: Roman Solomatin
Last updated by: Roman Solomatin
Created on: Sep 24, 2011
Last updated: 8 years ago
Update Article

Revisions

View all history