dongshi949737 2011-02-12 06:44
浏览 40

需要帮助开发一个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

  • 写回答

4条回答 默认 最新

  • douchuitang0642 2011-02-12 06:47
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 虚心请教几个问题,小生先有礼了
  • ¥30 截图中的mathematics程序转换成matlab