function GetError(array $params = array()) { $allParams = array_merge($params, $this->ErrorParams()); if ($this->error) { return Worder::ReplaceArgs($this->errorLabelPrefix . $this->error, $allParams); } return ''; }
private function InitTexts() { $translator = PhpTranslator::Singleton(); $translator->SetLanguage('en'); $translator->AddTranslation('en', 'Phine.Installer.StatusDescription.Table_{0}.Total_{1}', 'Creating Database Model {0} of {1}'); $translator->AddTranslation('en', 'Phine.Installer.StatusDescription.Sql_{0}.Total_{1}', 'Executing Bundle SQL {0} of {1}'); Worder::SetDefaultRealizer($translator); }
/** * * @param type $progress * @param type $progressCount */ function Report($progress, $progressCount) { $this->data['progress'] = $progress; $this->data['progressCount'] = $progressCount; if ($this->descriptionLabel) { $this->data['progressDescription'] = Worder::ReplaceArgs($this->descriptionLabel, array($progress, $progressCount)); } IO\File::CreateWithText($this->targetFile, json_encode($this->data)); }
function TransArgs($string, array $args) { return Worder::ReplaceArgs($string, $args); }
/** * Sets a translatable attribute ofe the field to a default placeholder * @param string $name The field name * @param string $attribute The attribute name */ protected function SetTransAttribute($name, $attribute) { $field = $this->GetElement($name); $field->SetHtmlAttribute($attribute, Worder::Replace($this->AttributePlaceholder($name, $attribute))); }