ZF-4084: Generation of a "Notice: Undefined index: target-language" using Zend_Translate_Adapter_Xliff

Issue Type: Improvement Created: 2008-08-27T02:37:05.000+0000 Last Updated: 2008-09-02T10:39:20.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Remy Damour (remy215) Assignee: Thomas Weidner (thomas) Tags: - Zend_Translate

Related issues: Attachments:


When using Zend_Translate to parse xliff files (generated through translate-toolkit: po2xliff), I end up with the following notice error: Notice: Undefined index: target-language in /home/remy/my_php/ZendFramework-1.5.3/library/Zend/Translate/Adapter/Xliff.php on line 119

I've looked at Oasis xliff 1.2 specification to check if "target-language" attribute of "file" node is mandatory, but it appears it's optional (cf.…) Line 119 in Zend/Translate/Adapter/Xliff.php "$this->_target = $attrib['target-language'];" could be replaced by "$this->_target = array_key_exists('target-language', $attrib) ? $attrib['target-language'] : null;"

Regards, Remy


Posted by Thomas Weidner (thomas) on 2008-08-27T12:10:34.000+0000

Sorry, but the actual implementation of Xliff for Zend_Translate

*) is based on Xliff 1.1 *) must have a target-language even if it's optional

This is not a bug but a feature request.

Posted by Thomas Weidner (thomas) on 2008-08-28T12:34:52.000+0000

Feature integrated with r11112

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:20.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.