David Krings wrote:
Hi!

function and a short array name will condense the calls. It is not as short as _(), well, I could name my function _, but I don't think that is a good idea. Maybe ~() or €() isn't taken yet. The other disadvantage

I found that PHP doesn't like ~ as a function name, but € is fine. After reading in the ini file or a portion of it I can now craft echos as such
echo €(123456, $l, "This is the default string.");
with the integer being the numeric key (alphanumeric would work as well, but with alphas in the key spellchecking the ini string file is a pita), $l the array that contains the string for the current script, and the optional string being a default text if the requested string is not found. I may get back to it and refine the € function to pass things like a number or a date along that then needs to be inserted into the correct position, but I will see if I need this for my app. If anyone is interested in the functions let me know and I'll post them.

So long, gettext, maybe next time....


David

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to