1 (edited by yannlog 2006-08-25 14:01)

Topic: Translate the registration form

Hello !
I'm the webmaster of a french and international collectors site. Members came from everywhere and language seems to be a barrier for them.
I'd like to know if it could be possible for a visitor to register to my punbb forum in other language than the default one in french. Actually the rules are in french and the members have to accept this one to go to the register section and choose the language of their choice. It's too late because they can't read the rules in french.
I'd like to simply make a multilanguages register form.
I don't know what to do : several forms, several translation ... ???
Could you help me to find the good solution ? Thank you.

Re: Translate the registration form

I'm also looking for some kind of modification that would allow users to Agree / Accepter or Cancel / Canceller to the forum rules and be taken (if applicable) to the desired language registration page.

Either that or a single registration page with both language in it, as long as it would be clear for the users..

Any idea? Or maybe another tip that would do the trick?

Thanks!

Re: Translate the registration form

Having both languages in one form would be easy, just edit lang/[your forum's default language]/register.php to have a translation below / beside each entry.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Translate the registration form

But register.php says that some of the language definitions are also used in post.php. So once the registration is done and the language selected the users would still see some (unnecessary) translated text in post.php right?

How about being able to select the language without being registered? A dropdown that would allow the user to select the language prior to the registration? (it's probably impossible... otherwise it would have been already done right? ; ) )

Thanks, I guess I can manage something out with that first option but if any other ideas pop up let me know!

Re: Translate the registration form

Vanslyde wrote:

But register.php says that some of the language definitions are also used in post.php. So once the registration is done and the language selected the users would still see some (unnecessary) translated text in post.php right?

Ah, I forgot about that. You could always make two separate copies with different names, then make register.php and post.php require different language files.

Vanslyde wrote:

(it's probably impossible... otherwise it would have been already done right? ; ) )

It's certainly possible; it's just a matter of finding someone with expertise willing to spend time on such a task.

Looking for a certain modification for your forum? Please take a look here before posting.

6 (edited by Solovey 2006-12-01 08:24)

Re: Translate the registration form

What I did was make different register.php's that have the language tag hard coded at the top, and then link to them from the first page, or from the English text that shows when the user is not logged in.

Re: Translate the registration form

Something like ??
http://doc.worldelite.net/lang.select.rules.jpg

It alowes users to select the language on the *Forum Rules* page and passes that language on to the *Registration Form*.
After that euh .. they can do it in the profile wink

If this is what you are looking for I could back-port it from Rev.Base to punbb wink

Re: Translate the registration form

exactly!

9 (edited by jlangrock 2006-12-06 08:12)

Re: Translate the registration form

Properly You should start with a check which language a potential user/reader is using at browser level therefore you can read  $_SERVER["HTTP_ACCEPT_LANGUAGE"]

see more details about language tags at w3.org
http://www.w3.org/International/article … iew.en.php


?php
    $language = $_SERVER["HTTP_ACCEPT_LANGUAGE"];
    switch($language) {
    case 'de': $forward = 'check/de/welcome_register.php';break;
    case 'en': $forward = 'check/en/welcome_register.php';break;
    default: $forward = 'check/en/welcome_welcome.php';
    }
    header ("location: $forward");
?>

With that sample you have to generate complete new pages for each language other possibility is



<?php
    $language= $_SERVER["HTTP_ACCEPT_LANGUAGE"];
    switch($language) {
    case 'de': include('includes/de/navigation.php');break;
    case 'en': include('english_navigation.php');break;
    default: include('english_navigation.php');
    }
?>

third way could be

<?php
    $language= $_SERVER["HTTP_ACCEPT_LANGUAGE"];
    mysql_query("SELECT text FROM $language WHERE id = $id");
?>

or

<?php
    $language= $_SERVER["HTTP_ACCEPT_LANGUAGE"];
    if ( eregi('de', $language) ) {}
?>

but never less the user has to have a choice to change the language to his native once:

<?php
    if ( isset($_GET["language"]) ) {$language= $_GET["language"];}
    elseif ( isset($_POST["language"]) ) {$language= $_POST["language"];}
    else {$language= $_SERVER["HTTP_ACCEPT_LANGUAGE"];}
?>
The poor horseman without horses
www.galopp-sport.eu

http://claimid.com/jlangrock
[img]http://claimid.com/images/hcard.gif[/img]

Re: Translate the registration form

would somebody be interested to set up a mod to have a front end for international sites?

Please let me know, we could develop it together so that there will be a useful tool for everybody operating internationally.

The poor horseman without horses
www.galopp-sport.eu

http://claimid.com/jlangrock
[img]http://claimid.com/images/hcard.gif[/img]

11 (edited by Bodram 2006-12-06 12:10)

Re: Translate the registration form

Vanslyde wrote:

exactly!

oki
I have done the front end so now all that's left is the admin part ...
I'l keep yha uptodate on the status wink