需要帮助开发一个2种语言的英语和法语网站

In admin side he enters the english text and same will be converted into french (using google API) for example in admin side if i enter the text 'Category' the same converted into 'catégorie'(in IE--->cat�rie) and also save into database as

nameEnglish---> category
nameFrench --->catégorie

since the process is fine but my problem is in user side, if the user selects french language the content has to display in french. but it is displaying as 'catégorie' instead of what i was stored in DB 'catégorie'. I dont know what to do. Should i install any language pack? or is it db issue?

http://gates.cc/works/jp-evolution/blog-detail.php?lang=2&bId=7

Try storing special characters such as é and ü as HTML entities.

Check the PHP function htmlentities for converting special characters into HTML entities.

When you convert, f.e. "école" will be stored as: école and HTML will render the special characters correctly.

Edit: Based on my previous experiences, even when my collation was set to UTF-8, I had the same problem and had to convert them using HTML entities. So instead, I stored them as HTML entities from the beginning.

The HTML header should state that the page encoding is UTF-8.

&ltmeta http-equiv="Content-Type" content="text/html; charset=utf-8" />
&ltmeta charset="UTF-8" />

The first one for XHTML, the second one for HTML 5.

Also, you DB and Tables should be using UTF-8 encoding (if you're in MySQL, try using SET NAMES 'utf8').

That should handle the issue with no problems.

To enable UTF-8, there are several steps to take. This is a pretty good write up. http://developer.loftdigital.com/blog/php-utf-8-cheatsheet

You can also convert the string returned from the database to html entities by using the php function: htmlentities. By executing this code your $string var should be displayable.

$string = htmlentities($string,ENT_IGNORE,'ISO8859-1');