From: skaill <sk...@ro...> - 2004-09-08 13:45:37
|
When using the built in gettext you cannot have variables interpolated within strings. Therefore I would still suggest not to do it or you are relying on the software version always. I do believe the software version should be included though for those who cannot have it installed. It also sounds easy enough to include it and you're saying it's stable. Checking whether the built in function exists and to call it or call the software version is the only other thing that needs to be done. Other than that we would be on the same plan we were on as far as changing the pages to provide translation. Nothing would change about that. Steve ----- Original Message ----- From: "Phil Daintree" <we...@pa...> To: <web...@li...> Sent: Wednesday, September 08, 2004 7:01 AM Subject: Re: [Web-erp-developers] Translation of sentence with parameters... > > > > on PEAR but > > > removing this dependency was really simple although I can't remember > > > exactly what > > > the dependency was, but it only took 30 mins to figure it out last time. > > > Looks like it was just the raiseerror function ? > I had a look at OA GetText.php class and looked at a diff between them > and the current class. > > This class is actually pretty minimal ;-) > > As I understand it this will read the .po file into an array every > page... must be a shocker performance wise!! I guess it is only a fall > back though. > > If the _ function is already there - ie gettext already compiled into > PHP then how can the variable stuff work. It would simply by-pass the > class altogether would it not?? Your shortcut function only works as > mine did to see if ! function_exists('_'). How could we over-ride the > existing function to use this class - which appears to use gettext > native if it can then if not fall back to parsing the .po file into an > array. > > I think Luca's DB method might be preferrable to this albeit we are into > cut and paste big time - which gettext overcomes fantastically with > xgettext. With the DB method at least we only retrieve the strings for > the script not the whole lot. > > This needs even more thought!! > > Phil > > Phil > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |