This topic is locked
[SOLVED]

 How to config languages.cfg for adding new language

3/9/2006 3:54:19 AM
PHPRunner General questions
D
davidmylien author

Hi ! Admin:

  1. I want to my php appplication (use phprunner as generator) to support Chinese Language (UTF8),

    What should do ?
  2. Can do as following steps ?

    a. add new language file chinese.lng (following XML syntax)

    b. add new line to languages.cfg
    but I do not know the lcid and codepage for Chinese Language (UTF8) ,

    please let me know how to do it.
    <language filename="Turkish.lng" name="Turkish" lcid="1055" codepage="1254" charset="Windows-1254" />
    3.Thanks
    David Lien

Sergey Kornilov admin 3/9/2006

David,
we have Chinese language files already and plan to include them to the next PHPRunner release.
Please try them out. Here are the installation steps.

  1. Download this file

    http://www.asprunner.com/files/chinese.zip

    and unzip it to C:\Program Files\PHPRunner\lang folder.
  2. Add the following two lines to languages.cfg file in the same folder:
    <language filename="Chinesebig5.lng" name="Chinesebig5" lcid="1028" codepage="950" charset="big5" />

    <language filename="Chineseutf8.lng" name="Chineseutf8" lcid="3076" codepage="65001" charset="utf-8" />


3. Now you can use Chinese in PHPRunner. You should select the same encoding (Big5 or UTF-8) as your data in database encoded in.
If you selected Chineseutf8 you'll need to modify generated PHP files.

Open include\dbcommon.php file with a text editor and .

change "$cCharset = ..." line this way:

$cCharset = "utf-8";

D
davidmylien author 3/10/2006

Hi Sergey !

  1. After downloaded the chinese.zip file and modified the languane.cfg and re-build the php code ,

    most pages could display chinese-utf8 & data (retrieve from mysql , charset = utf8) correctly.
  2. But the "menu" page can not cottectly display chinese-utf8 unless I change the browser encoding from

    chineseBig5 to unicode manually.
  3. Please kindly tell me how to fix it.
    Thanks
    David Lien

A
amuro 10/16/2007

Hi, admin
I use PHPRunner 4.1, the language is chineseutf8
I haved done the steps you posted here,
but the visual editor is garbled.
I can't see the correct chinese text in visual editor.
Thank you!

Alexey admin 10/17/2007

Amuro,
try to switch to HTML mode in Visual Editor and add this tag into the beginning of page, to HEAD section:

<META http-equiv=Content-Type content="text/html; charset=utf-8">


If <META http-equiv=Content-Type tag is already there just change charset to utf-8

A
amuro 10/19/2007

Hi, Alexey
It doesn't work. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=22374&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
Thank you

Alexey admin 10/19/2007

Amuro,
contact support team directly at support@xlinesoft.com
Send your HTML page with META tag and some screenshots that describe the problem.