PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Standard I18n Targets

Now that you've attached a translation object to, what exactly can you translate by default?

  • Validation error messages. Validation error messages may be translated. To do so, use the various error code constants from the Zend_Validate validation classes as the message IDs. For more information on these codes, see the Zend_Validate documentation.

    Alternately, as of 1.6.0, you may provide translation strings using the actual error messages as message identifiers. This is the preferred use case for 1.6.0 and up, as we will be deprecating translation of message keys in future releases.

  • Labels. Element labels will be translated, if a translation exists.

  • Fieldset Legends. Display groups and sub forms render in fieldsets by default. The Fieldset decorator attempts to translate the legend before rendering the fieldset.

  • Form and Element Descriptions. All form types (element, form, display group, sub form) allow specifying an optional item description. The Description decorator can be used to render this, and by default will take the value and attempt to translate it.

  • Multi-option Values. for the various items inheriting from Zend_Form_Element_Multi (including the MultiCheckbox, Multiselect, and Radio elements), the option values (not keys) will be translated if a translation is available; this means that the option labels presented to the user will be translated.

  • Submit and Button Labels. The various Submit and Button elements (Button, Submit, and Reset) will translate the label displayed to the user.

Zend Framework