ZF-7130: Zend Translate Adapter folder scan issue for variable strlen locale folders


Problem with using variable string length folder names when scanning the translate folder.

e.g. $translate = new Zend_Translate('array', $this->_root . '/data/locale/translate', 'en_GB', array( 'scan' => Zend_Translate::LOCALE_DIRECTORY ) ); It scans through the directory alphabetically, but ignores valid directories that are of shorter string length than the previously matched directory.

Zend_Translate_Adapter line 159:

if (strlen($prev) <= strlen($file)) {

e.g: path/to/translate/en path/to/translate/en_GB path/to/translate/ja

ignores 'ja'. manually added required translation files (old method) for now.


Fixed with r17813

Fix has not been released yet. In ZF 1.9.5, I still have the problem. See my Issue #8286.

You may note that this issue is marked as "fixed with next minor release". This means 1.10.

When you are in need of this code then you must use SVN trunk.