studio224
Member
Posted 2 years ago #
I have just installed a fresh copy of WP202 and I am trying to localize it in Portuguese. I have followed the instructions, changed and uploaded my wp-config.php:
define ('WPLANG', 'pt_PT');
Created a languages folder under wp_includes and uploaded the correponding language file: pt_PT.mo
Nothing. WP is still in english. I uploaded the other portuguese language file: pt_PT.ISO-8859-1.mo and still nothing. Everything is in english.
Short of translating everything thing in every php file... I don't know what to do. Any ideas?
AClaire
stephenju
Member
Posted 2 years ago #
Does you PHP have gettext support?
studio224
Member
Posted 2 years ago #
Hmmm, I don't know, let me check.
studio224
Member
Posted 2 years ago #
I have just checked it, yes Gettext is enabled.
stephenju
Member
Posted 2 years ago #
What kind of server is it? Maybe the server itself doesn't have your language's locale support?
studio224
Member
Posted 2 years ago #
It must have because when I installed b2bevolution to test it, the localized portuguese version worked perfectly. I have other sites in portuguese on this server (I have a shared hosting) and it works perfectly.
I am baffled! If I don't solve this I'll have to work with b2bevolution although I don't like it, but my blog needs to be in portuguese. Damn! Wordpress is a much stabler application...
studio224
Member
Posted 2 years ago #
I have just made another test, I have tried to localize WP in french, it doesn't work either.
studio224
Member
Posted 2 years ago #
Well, I have solved it. But it's really weird. I have applied a solution that's supposed to solve problems with PHP5, although my server is using Version 4.4.2.
So in gettext.php I replaced:
// $MAGIC1 = (int)0x950412de; //bug in PHP 5
$MAGIC1 = (int) - 1794895138;
// $MAGIC2 = (int)0xde120495; //bug
$MAGIC2 = (int) - 569244523;
with:
$MAGIC1 = (int)0x950412de; //bug in PHP 5
//$MAGIC1 = (int) - 1794895138;
$MAGIC2 = (int)0xde120495; //bug
//$MAGIC2 = (int) - 569244523;
I found the solution at the french support forum for WP.
stephenju
Member
Posted 2 years ago #
Glad to hear it's solved. I upgraded to PHP5 a month ago and never have this problem before or after that.