it sounds like a "in DB we trust" pattern. On Oct 27, 9:02 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hey everybody, > i was just checking the new features in 1.2.x and noticed how > internationalization was implemented. I was wondering how reading from > file behaves? Isn't loading a file that sometimes might be really big > at every page access slow? Is there any caching (maybe using shared > memory)? > > I usually keep my translations in database. This allows me several > things: > - create a cms for translations (the usual case is that a site-builder > won't handle the translation, but the client will, and a nice cms is > always appreciated) > - organize the words/phrases in categories and add meta data like the > date of last change, which adds flexibility (you don't have to scroll > 1000 not ordered words to find one, and maybe add tracking and > rollback for donkey clients - belive me there are many) > - speed things up significantly with a little trick: create a mirror > table for translations (of type MEMORY) that will contain all the > words/phrases in the normal table and will be used for queries. > Because MEMORY type tables only handle fixed length columns, i > fragment the words in peaces of fixed length (let's say 32char), but > my benchmarks showed me that even with the reconstruction of the > fragments, on heavily loaded sites, this is way way faster than normal > reads from db or file. To keep database integrity and not loose it in > case the server crashes cms makes modifications on both tables. But > this doesn't affect anything because 99.999% of the operations on this > table will be read. > > I know that we want to add flexibility but when using databases > (especially mysql), the advantages are not little and i think we > should consider an internationalization system with db support. > > What do you think? > Thanks, Cristian
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---