Jump to content

Recommended Posts

hey

i`m trying to make the prochatrooms chat script to translate messages

i managed to get the message translated and inserted into the database

now the hardest part for me is to get the translated message to show on the chat window

 

not even sure what to post her efor you to see, i think the show message stuff is 2 files related

 

one of them getdata.php wich i think gets the info from the database

 

and the main.php file wich i think is the main file of the chat window

 

anyway at the end of the getdata.php file i think i managed to add my data from the database using en_es and es_en

 

	$xml .= '<message id="' . $i['message_id'] . '">';
	$xml .= '<ring_bell>' . htmlspecialchars($ring_bell) . '</ring_bell>';
	$xml .= '<avatar_img>' . htmlspecialchars($i['avatar']) . '</avatar_img>';
	$xml .= '<user>' . htmlspecialchars($i['user_name']) . '</user>';
	$xml .= '<text>' . htmlspecialchars($i['message']) . '</text>';
	$xml .= '<text_en>' . htmlspecialchars($message_en) . '</text_en>';
	$xml .= '<text_es>' . htmlspecialchars($i['en_to_es']) . '</text_es>';
	$xml .= '<bcast>' . htmlspecialchars($broadcast) . '</bcast>';
        $xml .= '<time>null</time>';
	$xml .= '<webcam>' . $webcam . '</webcam>';
	$xml .= '<lastID>' . $_SESSION['total_messages'] . '</lastID>';
	$xml .= '<isSil>' . $SILENT . '</isSil>';
	$xml .= '</message>'	
}
$xml .= '</root>';
echo $xml;

 

you could see it as text_en and text_esi hope i did it ok

now the main.php file has alot of code wich actually i don`t understand

if u need i will post the contents of that whole file here or someplace else

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.