The current language system is already gettext compatible. To make translation more comfortable xgettext can be used to extract pot file. (Template).
Currenlty this is possible for example with:
find -path "./languages*" -prune -o -iname "*.php" -print >languages/files.lst
xgettext -f languages/files.lst -k_sb -L PHP -s -o strings.pot -p languages -c --no-wrap --debug --omit-header
This would be easier if all translations use _sb().
Currenlty the pot.php search direct access to lang_string[], It would be consquente if this is replaced by using _sb() function call.
_sb could be redirected to php gettext function, which could be a little bit faster.
PS: if gettext is not supported by php installation a fallback to something like
https://launchpad.net/php-gettext/
is possible.