From: skaill <sk...@ro...> - 2004-08-06 13:05:58
|
Two comments about the textualid/token use instead of looking up by actual string. Firstly, most strings will not be very long. Of course many will be more than 40 characters but unlikely to be more than a couple of sentences. If they were going to be long then the developer would likely put into the database as opposed to hard coding. Secondly, it is my belief, unless someone can say different, that this greater string length will be no faster or slower in database lookup. The database will have them indexed either way and would not go beyond the character that makes it distinct. e.g. "Hello world" "Hello dinner" At the w and d these two strings are different and will be indexed in that way to be found at the w and d difference. The parameter pass to the function (be it Luca's or gettext) will not take more or less time either as long as it is passed by reference (VAR) as opposed to a value that gets a copy. Steve ----- Original Message ----- From: "Daintrees" <p.d...@pa...> To: <luc...@pd...> Cc: <web...@li...> Sent: Friday, August 06, 2004 6:05 AM Subject: [Web-erp-developers] Re: Web-erp Multilanguage developement Luca, I didn't see the index.php script you sent must have missed that email - will hunt through my archive. I see the beauty of your approach - I like it's efficiency and the possibility for user translation - the reduced likely hood of syntax problems in the translation file etc. Its just that it will destroy the easy readability of the scripts and whilst multi-language would be brilliant I really don't want to compromise the system and the fundamental aims of the project - as I am sure you appreciate. The other lesser problem I see is that I am not so keen on creating a script with textualids and then inputing textualids and english translations into the database. The snag with 40 characters is that some of the echo statements where an error message is returned or some instruction printed on the screen are way more than 40 characters. Say the script SelectSalesOrder.php with the instruction.... "To search for sales orders for a specific part use the part selection facilities below" I've not counted, but this string must be getting close to 100 characters with that one and there are many longer messages. So 40 characters is just not going to cut it. I don't know much about multi-language applications, but the guys that do all use gettext .... I figure that this must be the best approach. I'll try and find the index.php you sent to have a look. Thanks for considering the good of the project in your work - it really would be a significant contribution if you could make it work. Phil -------Original Message------- From: ing. Luca Turlon Donà Date: 08/06/04 18:52:39 To: Daintrees Subject: Re: Web-erp Multilanguage developement Phil, I am sympathetic with your feeling, i.e. I am strongly bearing in mind the fact that readability is a MUST (in capital letters!) That's why I am creating the textual ids simply eliminating blanks and words like "and" from what is currently displayed. As an example "Work Centre Maintenance" has a textual id wich is WorkCentreMaintenance. If you feel unconfortable with this I can try another approach: Keeping the English label as textual id: the only thing is to replace blanks with "_". With this approach, until now 40 chars has been sufficient to have a self explaining textualid, but I am ready to enlarge that field again. So the problem is not the size of the textual id but the readability: I sent the modified index.php. Have you read it? Do you feel that the textual ids are understandable? Please I need Your feedback. Luca Scrive Daintrees <p.d...@pa...>: > Luca, > > I feel this approach will destroy readability with only a 40 character > lookup field. Good luck with it anyway. > > Regards > Phil > > -------Original Message------- > > From: ing. Luca Turlon Donà > Date: 08/06/04 03:45:55 > To: Phil Daintree > Cc: web-erp-developers@.SYNTAX-ERROR > Subject: Web-erp Multilanguage developement > > Phil and all developers > > I've started the multilanguage job. > I designed 3 tables. > - "labelids" contains a numerical id for each label, a textual id (which > is > more understandable and will be used in the scripts). Each label refers > to a > single script and the textual id has to be unique. > - "languages" contains the languages into wich the application could be > translated > - "labelsText" contains the text that is going to be displayed > Attached you can find a png with the db schema. > > I used the SimpleWebFront plugin of FabForce DBDesigner to automatically > generate the application to insert the values. > > I finished modifying the 'index.php' file. Now I have all the menus in > Italian. > > There is a nice thing in the approach I am following: the application is > not > affected by the work I am doing: i.e. I can stop making code changes and > go > to > lunch: the application still works (unless you make syntax error of > course!!!). > I enclose the modified index.php file. You can search for "echo $lang" > to > find > all the points where code changed. > > see all > Luca > > > > ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ Web-erp-developers mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/web-erp-developers |