/** * @return array translations to pass to JS objects */ protected function getTranslations() { if (!isset($this->_translations)) { $this->_translations = array_merge(parent::getTranslations(), array('dialogTitle' => Yii::t('profile', 'Select a {Doc}', array('{Doc}' => Modules::displayName(false, 'Docs'))), 'closeButton' => Yii::t('profile', 'Close'), 'selectButton' => Yii::t('profile', 'Select'), 'docError' => Yii::t('profile', 'Please select an existing {Doc}', array('{Doc}' => Modules::displayName(false, 'Docs'))))); } return $this->_translations; }
/** * @return array translations to pass to JS objects */ protected function getTranslations() { if (!isset($this->_translations)) { $this->_translations = array_merge(parent::getTranslations(), array('dialogTitle' => Yii::t('profile', 'Change URL'), 'closeButton' => Yii::t('profile', 'Close'), 'selectButton' => Yii::t('profile', 'Change'), 'urlError' => Yii::t('profile', 'URL cannot be blank'))); } return $this->_translations; }
/** * @return array translations to pass to JS objects */ protected function getTranslations() { if (!isset($this->_translations)) { $longMonthNames = Yii::app()->getLocale()->getMonthNames(); $shortMonthNames = Yii::app()->getLocale()->getMonthNames('abbreviated'); $translations = array('Create' => Yii::t('app', 'Create'), 'Cancel' => Yii::t('app', 'Cancel'), 'Create Chart Setting' => Yii::t('app', 'Create Chart Setting'), 'Check all' => Yii::t('app', 'Check all'), 'Uncheck all' => Yii::t('app', 'Uncheck all'), 'metric(s) selected' => Yii::t('app', 'metric(s) selected')); $englishMonthNames = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); $englishMonthAbbrs = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); foreach ($longMonthNames as $key => $val) { $translations[$englishMonthNames[$key - 1]] = $val; } foreach ($shortMonthNames as $key => $val) { $translations[$englishMonthAbbrs[$key - 1]] = $val; } $this->_translations = array_merge(parent::getTranslations(), $translations); } return $this->_translations; }
/** * @return array translations to pass to JS objects */ protected function getTranslations() { if (!isset($this->_translations)) { $this->_translations = array_merge(parent::getTranslations(), array('Grid Settings' => Yii::t('profile', 'Widget Grid Settings'), 'Cancel' => Yii::t('profile', 'Cancel'), 'Save' => Yii::t('profile', 'Save'))); } return $this->_translations; }