Skip to content

Commit

Permalink
Merge pull request #1 from NewLIST/TranslateFormElementDescription
Browse files Browse the repository at this point in the history
Added auto translate for Form Element getDescription
  • Loading branch information
BeauNewLIST authored May 20, 2020
2 parents cf858c0 + 6851df2 commit ea28100
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/Zend/Form/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,11 @@ public function setDescription($description)
*/
public function getDescription()
{
$translator = $this->getTranslator();
if (null !== $translator) {
return $translator->translate($this->_description);
}

return $this->_description;
}

Expand Down

0 comments on commit ea28100

Please sign in to comment.