I just inherited a website written in PHP to internationalize it… The problem is the code is not consistent. It has some functions that have strings inside echo and another pieces and in another functions the php is closed and html is presented the right way.
I was looking for a tool that could easy my job as much as possible. Retrieving as much strings as it could and defining (through defines) in another file.
I though about creating a script with regex functions to achieve this but if there was anything out there… I looked but couldn’t find. Maybe I’m using wrong terms as I’m not English native.
Does anyone know a good way to do this?
If you are open to using
gettextfor I18N, then you can usexgettext: http://www.gnu.org/s/hello/manual/gettext/xgettext-Invocation.htmlHere is a tutorial detailing how you can use it in PHP: http://www.phpdig.net/ref/rn26.html