Yii localization date format indonesia

cara mudah untuk lokalisasi bahasa dengan YII pada main. [php] ‘preload’ => array(‘log’), ‘sourceLanguage’ => ‘id’, [/php] pada setiap model yang kita punya tambahkan [php] protected function afterFind() { foreach ($this->metadata->tableSchema->columns as $columnName => $column) { if (!strlen($this->$columnName)) continue; if ($column->dbType == ‘date’) { $this->$columnName = Yii::app()->dateFormatter->formatDateTime( CDateTimeParser::parse($this->$columnName, ‘yyyy-MM-dd’), ‘medium’, null); } elseif ($column->dbType == […]

© 2018 IT & Photography blog | ScrollMe by AccessPress Themes