From: Randall H. W. <rh...@ea...> - 2002-03-21 23:19:21
|
Regarding the new language constructs: I have this week been (mostly to exercise my PHP muscles) a translation database maintenance module for 0.8.x (The purpose was that the ??.pp files could be generated from a database before building phpWebSite and that anyone could suggest translations although a maintainer would need to approve suggestions before they are included in the builds). I'll have it done this weekend. Right now it uses mod_translation_* for its own purposes and i18n_translation_modname and i18n_translation_core for the translation tables. It includes an i18n (internationalization/localization) class that can handle translations and maybe in the future other internationalization/localization tasks (like numerical and date/time formatting). The current call is $i18n->translate($string). By including the function in a class, I can cache translation calls to reduce the number of db calls...but call the db to translate any string required... I can think of a couple of reasons to store the translations in the database: 1) files full of code do not have to be maintained. 2) translations can be updated off the web without having to download, FTP and install a file. 3) translations do not have to sync with the English updates. Code can be updated, patched, whatnot and translations can come later, if need be... I hope you find this rambling helpful... -- Randall Wood rh...@ma... |