Yii Framework Forum: Wrong Pagination After Setting Value To Yii::app()->Language - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Wrong Pagination After Setting Value To Yii::app()->Language Rate Topic: -----

#1 User is offline   Kboy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 13-January 13

Posted 13 January 2013 - 08:24 AM

Hi all,

When I am testing the code for translation, I change the code for the actionIndex as following:
	public function actionIndex()
	{
		$dataProvider=new CActiveDataProvider('User');
		Yii::app()->language='zh'; // I just added this line
		$this->render('index',array(
			'dataProvider'=>$dataProvider,
		));
	}

The pagination on the page became "Displaying 1-3 of 1 result.|Displaying 1-3 of 3 results.". After I remove the line of code, the pagination is correct to "Displaying 1-3 of 3 results." Is it a bug?
0

#2 User is offline   Kboy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 13-January 13

Posted 14 January 2013 - 01:26 AM

The problem is the pagination does not support 'zh' but 'zh_cn' and 'zh_tw' are ok. Solved!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users