When I use following code:
$text = /*some text*/;
$langs = array('en', 'pl');
foreach($langs as $lang) {
$text = preg_replace("/I18N\('(.+?)'\)/e", 'func("$1", "$lang")', $text);
}
preg_replace only works for the first array element ('en' in this example). What am I doing wrong?