From: Matthew M. <ma...@tu...> - 2002-03-20 18:08:03
|
> I'd like to suggest that there be multiple files, and that > one definition inside that file would indicate that it > has already been loaded. > $lang_loaded["books"] = "yes"; //module is called "books" > This way, we only load what is needed. > > If not ($lang_loaded["books"]) { > include 'books_file' > } Agreed. Think about this too: 1) all module language files are loaded at once. 2) Only the active modules language files are loaded. a)They are unloaded when not in use. b)They are kept in memory until user logs off. Which is fastest/smarter? 1) All loaded at once and then never again is one file hit but more memory 2) More file hits, less overhead a) Even less overhead b) More overhead but no more file hits This may be an exercise in minutia but I am interested in 'the best way'. > There should also be a local overide file, so that site operators can > tailor some of the messages without changing the released > files: Good point. I'll make sure that is in the translate module as you may have different translations within the same language. > It would be nice also if we had a file of generic translations for > things like "Submit", "Delete", "Are you Sure". Ya I was thinking about this. Consider also that a programmer may program in Spanish and we use an English translation. The generic translation file becomes useless if the Spanish speaker could care less about English =) Maybe a combination? Not sure yet. > I have not yet used session_register to save arrays. If this can be > done, then I like the use of arrays. What is the syntax for > registering an array? Is it the same as registering any other > variable? Yes. > I assume you will be writing a function to do this. Not sure yet. For developer simplicity, I like the idea of just entering: echo LANG_modulename["trans_this"] instead of $core->translate(LANG_modulename["trans_this"]) Kind of like calendar but with the language mod doing the work behind the scenes. Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |