Hi people
I'm doing a translation of php script and want to gain some time by doing some automatization
The file contains very large number of lines like these
define('LNG_NewsletterNameIsNotValid', 'Email Campaign name is not Valid');
define('LNG_UnableToCreateNewsletter', 'Unable to create an Campaña de Email');
define('LNG_HLP_NewsletterName', 'You must insert \\\'Custom Fields\\\' in the field.');
define('LNG_UnableToUpdateNewsletter', 'Unable to update '. LNG_xxx . ' from Email Campaign');
and I would like to:
- open each php file
- go through each line
- get the string corresponding to each define()
- put a field where I should write the translation
- save the new string to the file
I have the script almost done, except for the part for getting the string to be translated from each line. I point several examples so you can see that translation strings can contain references to other variables, quotes, etc.
Do I need a regular expression, right?
Can any1 help me with one?
Thanks