Firefox PHP

Hack so user can choose phorum language

Posted by spade 
Hack so user can choose phorum language
September 05, 2002 10:59PM
It seems to me that best situation for a forum where the users speak several different languages is for each person to post in her own language, and everyone else read the post in their language of choice. Technology isn't quite up to doing good machine translations of posts (yet), but the following modifications at least allow the user to specify the language in which the forum controls appear. Properly written header.php and footer.php files can also be read in different languages, if one pays attention to the variable $ForumLang in them.

I implemented the changes (to version 3.32c of Phorum) by changing the following files:

common.php

register.php

profile.php

and, finally, the language files need the to define the message '$lLanguage'
for example:
$lLanguage = "Language:"; (from lang/englisg.php)
$lLanguage = "Lengua:"; (from lang/spanish.php)

One also needs to make a change to the ' $PHORUM[auth_table]' database (in my case, the table named 'forums_auth'). For mysql, the command was:
alter table forums_auth add lang varchar(50) NOT N LL default ''

(As implemented, if the record in 'forums_auth' is blank, the phorum behaviour is unchanged, and the language will be specified on a forum by forum basis, by the administrator.)

If you have not modified the three .php files (common.php, profile.php, and register.php) you can simply replace your current files with my files (Be sure to make backup copies of your files first!!!). If you have modified the files, then you will have to make some edits. It is easier if you saved a copy of the original files, then by comparing the differencs between the original file and your version with the differences between the original file and my version, you should be able to figure it out.
Re: Hack so user can choose phorum language
September 05, 2002 11:10PM
Hmm - no attachement.

Oh well, you can find the attachment at [spade.com]
Anonymous User
Re: Hack so user can choose phorum language
September 08, 2002 12:22PM
sounds interesting though I didn't look at the code yet.
would you mind if we use it for a later phorum version?

Re: Hack so user can choose phorum language
September 13, 2002 04:13PM
ts77 wrote:
... would you mind if we use it for a later phorum version?

Not at all, please do (it will save me hacking it into later versions).
Anonymous User
Re: Hack so user can choose phorum language
September 15, 2002 12:25PM
just commited to 3.4-cvs. should be useable in the next snapshot.

Sorry, you do not have permission to post/reply in this forum.