PHPTAL / HTML_Template_PHPTAL (0.4.7) / GetText / Types
| From: | laurent bedubourg | Date: | Wed, 19 Mar 2003 15:00:42 +0000 |
| Subject: | PHPTAL / HTML_Template_PHPTAL (0.4.7) / GetText / Types | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-14452@lists.php.net to get a copy of this message | ||
New version with a PEAR compliant name like proposed in earlier messages.
For those who didn't follow PHPTAL last week episode, watch list archives
or take a trip to its homepage
http://laurent.bedubourg.free.fr
PHPTAL has two dependencies for which i'd like PEAR point of view. I'm
wondering if they will be of help for other projects or if i just have to
integrate them to PHPTAL package without complaining :)
* GetText package :
To support internationalisation in PHPTAL, i wrote a GetText package that
wrap gettext php support (if compiled) or emulate it (if not compiled)
transforming gettext po files into php files returning associative arrays.
Concerning interesting features, the GetText package allow some variable
interpolation while translating sentences.
For instance :
"Welcome ${userName}, you have ${nbrMail} mails !" "Bienvenue ${userName},
vous avez ${nbrMail} nouveaux messages !"
You can have more information and download the GetText package here :
http://laurent.bedubourg.free.fr/php/gettext/
At this time, the PEAR package installs GetText.php file in PEAR
repository (as the package name is not choosen yet).
As this package is an internationalisation related package, i'd like to
name it 'I18N_GetText'.
But a I18N package already exists, is it safe to name and install my
GetText package here or will i face some known problems ?
Does the package looks good enough for PEAR ? Do you prefer another name ?
Do i rather integrate it in a HTML_Template_PHPTAL_GetText file ? What's
the strongest an elephant or an hippopotamus ?
* Types package :
same problem and much more.
http://laurent.bedubourg.free.fr/php/types/
Types is a generic package that brings some OO wrapped types with a
usefull Iterator interface.
There's a very short and useless peace of doc here :
http://laurent.bedubourg.free.fr/php/types/Iterators.txt
Please takes time to look at classes to get the idea (Vector, Hash,
String, ...)
It also contains some reference related functions and a reference handler
class (named Ref) which allow coders to safely use objects inside php
arrays, functions parameters, any non reference awared php function,
without loosing the base object and without even the '&' .
Don't know if someone used this system before in php (certainly) but it's
really sugar when you have to deal with critical objects in strange code.
Documentation here :
http://laurent.bedubourg.free.fr/php/types/References.txt
Related file is : Types/Ref.php
There's also an anonymous function handler and a very simple Date class (i
can't remember why i coded the later but it is there so if someone needs a
date that can be added to another date object :).
Should i prefix this package ?
Which name ?
Should i integrate it to PHPTAL instead ? What's the meaning of the
universe ?
Best regards,
--
Laurent Bedubourg
laurent.bedubourg@free.fr
HTML_Template_PHPTAL :: version 0.4.7 -- testers welcome
PHPTAL home : http://laurent.bedubourg.free.fr/