| User | Post |
|
2:12 pm 23 Jan 2008
| GKDantas
Member
| | | |
|
| posts 3 |
|
|
Hi people I have installed the forum today in anews wordpress site and cant get the pt-br translation to work… well even the WP translation isnt working is the 2.3.2 version. Any idea to solve this?
|
|
|
|
|
I know for sure that it works as I have users who have confirmed that. More importantly seems the question as to why the WP installation is not working.
The obvious question has to be have you set the language correctly in your config.php file? Check that first to ensure you have entered the country code correctly:
define ('WPLANG', 'pt_BR');
Next - have you created the folder for the language .mo file correctly? Details here in the Codex
Finally - as to the forum - the forum .mo file should reside in the ‘/languages’ folder directly underneath the ’simple-forum’ folder.
If none of THAT works then I would suggest you need to go onto the WP forums and find out why WP itself is not behaving.
|
|
|
2:22 am 26 Jan 2008
| GKDantas
Member
| | | |
|
| posts 3 |
|
|
Hi Swordfish, I did this like I did for others installations, but even those that work, after upgrade to 2.3.2 now dont work anymore. I ask now at WP foruns to see if anybody knows what is happen.
Thanks
|
|
|
|
|
Sounds like the best move.
If you solve this perhaps you’d come back and let us all know the answer.
|
|
|
11:14 am 26 Jan 2008
| GKDantas
Member
| | | |
|
| posts 3 |
|
|
The answer is that Bluehost now use 64bit, I got the answer in its foruns:
It seems that there´s an issue with the gettext library and wordpress running on x64 based machine. Basically it´s a byte addressing issue regarding the language files located at wp-includes/languages. The system cannot read the .mo file them it loads default english captions.
For Wordpress 2.3.2 open wp-includes/gettext.php and at line 105 find:
// Caching can be turned off
$this->enable_cache = $enable_cache;
// $MAGIC1 = (int)0x950412de; //bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565
$MAGIC1 = (int) - 1794895138;
// $MAGIC2 = (int)0xde120495; //bug
$MAGIC2 = (int) - 569244523;
// 64-bit fix
$MAGIC3 = (int) 2500072158;
$this->STREAM = $Reader;
$magic = $this->readint();
if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
$this->BYTEORDER = 0;
} elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
$this->BYTEORDER = 1;
} else {
$this->error = 1; // not MO file
return false;
}
Then change it to:
// Caching can be turned off
$this->enable_cache = $enable_cache;
// $MAGIC1 = (int)0x950412de; //bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565
$MAGIC1 = (int) - 1794895138;
// $MAGIC2 = (int)0xde120495; //bug
$MAGIC2 = (int) - 569244523;
// 64-bit fix
$MAGIC3 = (int) 2500072158;
$this->STREAM = $Reader;
$magic = $this->readint();
if ($magic == $MAGIC1 || $magic == $MAGIC3) { // <- 64 BIT FIX: CHANGE THIS LINE!
$this->BYTEORDER = 0;
} elseif ($magic == ($MAGIC2)) {
$this->BYTEORDER = 1;
} else {
$this->error = 1; // not MO file
return false;
}
Note the "& 0xFFFFFFFF"s have to be wiped out. Now Wordpress can recognize your .mo file under x64 architecture machines and load the correct language file. Please test it and post any questions, for me it worked.
P.S: Based upon wordpress and gettext forum threads.
You all can see the post at:
http://www.bluehostforum.com/showthread.php?t=11536&highlight=wordpress+language
|
|
|
|
|
Great nerws. And thanks for leaving the post here. I can use it if this comes up again.
|
|
|
4:28 pm 31 Jan 2008
| bee-carl
Member
| | | |
|
| posts 7 |
|
|
I have just instalered Simple Forum on my testsite http://elive.frugalware.dk/?page_id=9 and have the same problem. It doesn’t help to do like GKDantas have suggested. I have two other website at the same host where I use Simple Forum on Danish, here is there no problems. http://frugalware.dk/?page_id=45 and http://danish-wordpress.dk/?page_id=8
At my testste I have instalered Simple Forum after I have instalered WordPress 2.3.2
On my 2 other web pages have instalered Simple Forum when there was WordPress 2.3 but since upgraded to 2.3.2 without problems with the Danish language in Simple Forum
On all my 3 website there stands the following in wp-config.php
define (’WPLANG’, ‘da_DK’);
Is there somebody who can give an explanation on this
|
|
|
|
|
I really don’t know the answer to this but i will say that i have just noticed that the Danish language pack is mis-named. (it is named ‘da_Dk’ instead of ‘da_DK’. I doubt that is the problem as it would not explain why it works in one place and not another.
So… is your whole WP test site not translating or just the forum?
|
|
|
11:14 am 1 Feb 2008
| bee-carl
Member
| | | |
|
| posts 7 |
|
|
Yellow Swordfish said:
(it is named ‘da_Dk’ instead of ‘da_DK’). I doubt that is the problem as it would not explain why it works in one place and not another.
Sorry Andy it was my mistake, I have changed it and now it works fine. I will send the new files to you. It is of course human to make mistakes, and once in a while even I can write something incorrect! But it is somewhat strange that it seems to be working in some places, but as I have said, the problem has now been solved!
|
|
|
|
|
Hello Carl. Sorry - I didn’t realise this was you! If the problem was simply the file name capitalisation then I really should have noticed that as well.
|
|