ZF-8286: Zend_Framework directory scan skips small locales
In Rev 9511 there was a patch applied to Zend_Translate_Adapter that should speed up directory scanning.
It says: @rev9511 Zend_Translate: - increased scanning on degraded locales - added tests for file and directory scanning (ZF-3070)
With this patch all directories whose names are shorter than the one before are skipped. I assume that the author assumed skipping 'en' if 'en_GB' has been read already. This will not work out, though.
My case is as follows: I have translations for the following locales: 'de', 'en_GB', 'en_US'. There is a directory for each locale. According to my debugging the folder 'de' will never get read, as en_GB or en_US get read before. I also cannot switch to de_DE, as Zend_Locale does not provide translations for that locale. Only for 'de', 'de_AT' and 'de_CH'. Also, I can imagine that this may cause trouble if one uses locales 'syr', 'de', 'en' and 'fr' for instance. As I see it, at some point the locales having two letters will be skipped, once locale 'syr' has been read.
For me the workaround is to only use 'de' and 'en' instead of 'de', 'en_GB' and 'en_US'. I will also not be able to use 'de' mixed with 'de_AT'. As you will see, this is not satisfying.
Please have a look into the matter.