I've written a script that will parse your module's php files and
generate a valid PHPWS language file. Right now I hard coded "en" but
whatever.
http://phpwsbb.sourceforge.net/createlang.php.txt
Just download, take the ".txt" off the name, cd into the top level of
your module and:
php /path/to/createlang.php
It will then recursively start at your pwd and get all translated texts.
It then writes a lang/$mod_title.en.lng file, grabbing $mod_title from
your conf/boost.php. *WARNING* It _will_ overwrite your current
language file. But in theory this is what you'd want.
Anyway feel free to use and report any bugs and what not. One big
concern that you might have is that right now it only searches based on
double-quotes, which is what I use. I know a lot of you use
single-quotes for things like $_SESSION['translate'] where I use
$_SESSION["translate"]. Feel free to add that capability and send me a
patch or just change my line for your own private, selfish uses, you
jerk.
Thanks to alindeman in #php for the regex help.
Don.
--=20
"The most important job is not to be governor, or first lady in my case."
George W. Bush
January 30, 2000
=46rom speech in Pella, Iowa and quoted in the San Antonio Express-News.
|