Allowing the translation of the legend of the fieldset in the render function in the FormCollection Helper. #4071

Closed
sarahman opened this Issue Mar 18, 2013 · 1 comment

Projects

None yet

2 participants

@sarahman

In the render function of the Zend/Form/View/Helper/FormCollection, the legend of the fieldset is not being translating.

I think, the code snippet should be like this---

// Every collection is wrapped by a fieldset if needed

if ($this->shouldWrap) {
    $label = $element->getLabel();
    if (!empty($label)) {
        $label = $escapeHtmlHelper($label);
        if (($translator = $this->getTranslator()) !== null) {
            $label = $translator->translate(
                $label, $this->getTranslatorTextDomain()
            );
        }

        $markup = sprintf(
            '<fieldset><legend>%s</legend>%s</fieldset>',
            $label,
            $markup
        );
    }
}

Now what do you think? I have faced this problem while working with the translation. Please suggest me if you have any.

Thank You.

@adamlundrigan
Member

This was added in #3532

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment