On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

In preparation for the release of Simple:Press Version 4.0, the Support Forum has moved to a new site dedicated to the plugin. This will also be the future home for Simple:Press Forum.


Version 3.1.4 will still be available for download here in the short term.


For the support forum - and to visit our new site and to get details of version 4.0, click on the logo to take you to simplepressforum.com

This forum is currently locked - access is read only
Current User: Guest
Please consider registering

 
Search Forums:


 




language problems

UserPost

2:12 pm
23 Jan 2008


GKDantas

Member

posts 3

1

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?

2:27 pm
23 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

2

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

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

10:01 am
26 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

4

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

5

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&nbsp;

3:32 pm
26 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

6

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

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

10:34 pm
31 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

8

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

9

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,Sealed 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,Embarassed 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!

11:23 am
1 Feb 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

10

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.



Reply to Topic: language problems

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 2 + 8        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

13 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 2068

Posts: 14091

Members:

There are 1003 members

There are 837 guests


Yellow Swordfish has made 5252 posts

Top Posters:

Mr Papa - 1602

-Radio- - 558

ovizii - 114

jfv - 82

angelic007 - 72

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)