Hi, Am Samstag, den 18.11.2006, 13:58 +0100 schrieb Thomas Weidner: [...] > Making 126 subclasses, one for every language, is a very bad design idea.
From the first look, yes, but from the second view maybe not. These classes would be very, very small. Making Zend_Filter locale aware is pretty hard to reach. You will have a big switch ... case-statement in every filter function which is not the best I guess. Having classes with a small footprint is maybe the better solution as in normal use-cases just one class must be loaded. > Why not making the filter locale aware ? A locale-aware Zend_Filter-class seems to be pretty fat-weighted. Remember the switch ... case. > Exactly therefor we created the complete Zend_Locale classes bunch. > > Filter without locale only recognising a-z > getAlpha($content); > > Filtering with locale recognising locale letters for example german > including ä, ö, ü, ß > getAlpha($content, $locale); This would be possible. We have Zend_Locale_Filter (or another name). Zend_Filter::getAlpha($string, "de") now calls internally Zend_Locale_Filter::singleton("de")->getAlpha($string) and returns the value (we would need some hybrid of singleton and factory there, as Zend_Locale_Filter would create, store and deliver the Zend_Locale_Filter_<locale>-object). And no, I did not thought further on saying "let's call it Zend_Locale_Filter" and I'm completely unideological how to name it. [...] > There is a general approach for usage which should be used by all classes > which want to be locale aware. [...] Greets, Lars -- "Kriterium des Wahren ist nicht seine unmittelbare Kommunizierbarkeit an jedermann" -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik« name: Lars H. Strojny web: http://strojny.net street: Engelsstraße 23 blog: http://usrportage.de city: D-51103 Köln mail/jabber: [EMAIL PROTECTED] f-print: 1FD5 D8EE D996 8E3E 1417 328A 240F 17EB 0263 AC07
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil