From: <bo...@el...> - 2002-03-20 17:51:36
|
I appreciate your asking for input. I hope these thoughts are helpful: I think we need multiple language files, not just one big one. The english file is 112,000 bytes today. I'm not sure how that would translate into memory usage. Maybe about half that. But as features and modules are added, it could get to be ten times its current size. Also, not all things will be short. How about instructions for instance? They can get detailed. 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' } There should also be a local overide file, so that site operators can tailor some of the messages without changing the released files: If ( !$lang_loaded["local_stuff"] ) && file_exists('local_language_mods') { include ('local_language_mods') ; } else if (!{$lang_loaded["local_stuff"])) { //to avoid checking for the file again $lang_loaded["local_stuff"]="yes" } It would be nice also if we had a file of generic translations for things like "Submit", "Delete", "Are you Sure". 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? I assume you will be writing a function to do this. The call to the function should also pass the option to force a reload: load_translation('books','') load_translation('books','reload') would force a reload. Bob T. |