new spin on translation package

From: Date: Mon, 18 Oct 2004 20:04:19 +0000
Subject: new spin on translation package
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33951@lists.php.net to get a copy of this message
Hello all, I wrote a small translation class today and was wondering if anyone might find it of interest for me to post it to pear. I didn't use the existing translation packages because I don't want to keep my translation text in a database and I also didn't use gettext because I wan some administrative functionality (an API) and until now did not know of the File_Gettext package. Honestly, I could probably use the translation2 package with the gettext container and that would do exactly what I want, but I wasted my time on this so I might as well post it and see if their is any value in it. Basically the premise is the package will generate a php include file for each language. Inside the include file is a large associative array with the key as the original language phrase and the value as the translated phrase value. You can load in a file or a bunch of files which will store the array of translated text into the global variable scope. I would assume that this is faster than parsing a gettext file since their is no parsing needed to be done. Is this worthless, can it be combined into the translation2 package or is the performance difference between my method and parsing gettext files irrelevant and I should just use the translation2 package? Source: http://webitecture.org/translator/translator.phps Demo1: http://webitecture.org/translator/test.php Demo1: http://webitecture.org/translator/test.phps Demo2: http://webitecture.org/translator/test2.php Demo2: http://webitecture.org/translator/test2.phps Thanks for any input Andrew

« previous php.pear.dev (#33951) next »