me too, im having this problem with 2.1
I have the same error. I disabled my localization (WP_LANG on wp-config.php) and the error is gone for the time being.
wow. you are true, i desabled too my (WP_LANG)-it was in spanish- and its fine everything. but, well its not ok, i mean, my other blogs are ok, and this one was the only having this problem.
…
I have the same problem, but I don’t want disable my spanish language file…
sorry for double post. my solution below-
I figured a temporary solution is a new ‘str_replace’ added to the ‘gettext.php’ in the wp-includes folder (function select_string()):
// NEW AT LINE 306
$string = str_replace(’,’,”;”,$string);
That does it for me at the moment with a german localization.
Erm…can you put that in a more “verbose” mode? Not very good with php and when I added your line to the line 306 in the gettext.php, everything crashed.
So..little more help pls. 🙂
Here is the complete code of the function select_string. Replace this (make sure to do a back up):
/**
* Detects which plural form to take
*
* @access private
* @param n count
* @return int array index of the right plural form
*/
function select_string($n) {
$string = $this->get_plural_forms();
$string = str_replace(‘nplurals’,”\$total”,$string);
$string = str_replace(“n”,$n,$string);
$string = str_replace(‘plural’,”\$plural”,$string);
// New
$string = str_replace(‘,’,”;”,$string);
# poEdit doesn’t put any semicolons, which
# results in parse error in eval
$string .= ‘;’;
$total = 0;
$plural = 0;
eval(“$string”);
if ($plural >= $total) $plural = $total – 1;
return $plural;
}
Hope it works for you. Otherwise download my version of the gettext.php here and replace it:
http://www.peter-noster.de/tmp/gettext.zip
Thanks a million, peter-noster. Your file did the trick!