Issues

ZF-6272: Missing functionality in Zend_Locale::getTranslationList, or Zend_Locale_Data::getList

Issue Type: Bug Created: 2009-04-11T09:16:28.000+0000 Last Updated: 2009-04-11T10:06:25.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Vaidotas Stankus (krienas) Assignee: Thomas Weidner (thomas) Tags: - Zend_Locale

Related issues: Attachments:

Description

There is an example of code from manual:

Example 31.20. All available translations {quote}// obtain a list of all the translation lists $lists = $locale->getTranslationList();

// show all translation lists available // (lots of output, all in English language) foreach ($lists as $list) { echo "List $list = "; print_r($locale->getTranslationList($list)); }{quote}

This example code for me is not working, as on $lists = $locale->getTranslationList(); I get an exception "Unknown list () for parsing locale data."

According to example in manual and definition of Zend_Locale::getTranslationList in code I assume that NULL value is normal for $path parameter: {quote}public static function getTranslationList($path = null, $locale = null, $value = null){quote} and in case it is NULL, it should return a list of translations. But this function doesn't do anything with $path, just simply use it for call of Zend_Locale_Data::getList function. After reviewing Zend_Locale_Data::getList implementation, I see that it doesn't consider NULL as valid value for $path parameter and if it is NULL simply throws an exception I had mentioned above.

I see inconsistency there and one of later should be done: A) Example removed from manual and definition of Zend_Locale::getTranslationList fixed to public static function getTranslationList($path -= null-, $locale = null, $value = null) B) Implemented functionality described in manual.

I use ZF v1.7.8. Had checked repository, but those functions everywhere looks the same.

Comments

Posted by Thomas Weidner (thomas) on 2009-04-11T10:06:21.000+0000

Fixed with r14847

Have you found an issue?

See the Overview section for more details.

Copyright

© 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.

Contacts