Elxis CMS Forum

Support => Language => Topic started by: xmanhattan on June 08, 2009, 13:24:49

Title: Chinese
Post by: xmanhattan on June 08, 2009, 13:24:49
I have finally managed to attain a Chinese client after long discussions.

I have asked a question about this in the past but now I need to ask a different question.

As there is no Chinese available as yet for Elxis, can I create a Chinese directory and copy the English language files into the /language/chinese folder so that I can have a Chinese flag with an English system?


Title: Re: Chinese
Post by: xmanhattan on June 08, 2009, 13:36:03
I just did this on my test server and it appears to work.  The Chinese language appears in the language configuration and then in the langauge selections.

If there are any other possible problems that may occur though I would like to know.

Title: Re: Chinese
Post by: datahell on June 08, 2009, 14:14:57
It will work fine.
Just make sure you have set properly the Chinese language files (i.e. the class name inside "pref" language file, the language iso code, etc).
Title: Re: Chinese
Post by: xmanhattan on June 08, 2009, 15:55:48
Hello Datahell,

Just another question.  I copied and renamed all the english files to chinese, made changes to english references in the files to chinese, and to the pref that you mentioned.  I did not change the iso code from utf-8 although I did find on another chinese web site that they are using charset=gb2312.

I have a few english, greek, and 2 test chinese menus but the chinese menus are not showing.  The english menus are being shown instead even though I have created a frontpage link for the chinese with language as chinese.

Is there something that controls or links to the menus to the languages that I have missed?
Title: Re: Chinese
Post by: Ivan Trebješanin on June 08, 2009, 16:27:40
... I did not change the iso code from utf-8 although I did find on another chinese web site that they are using charset=gb2312.
That is not ISO code, utf-8 is charset. ISO language code is two letter code for given language (en for english, el for greek...) Chinese is zh Ithink...
Also if you are using SEO PRO you must add rewrite rule for chinese in .htaccess
Title: Re: Chinese
Post by: xmanhattan on June 08, 2009, 16:45:58
Hello Ivan,

Yes, I changed that from en to cn but the chinese menu is not showing.

Code: [Select]
class prefLang_chinese {

define('_LANGUAGE','cn'); //Two-letter language code
define('_ISO','charset=UTF-8'); //leave it as is!

Quote
Also if you are using SEO PRO you must add rewrite rule for chinese in .htaccess

Is this really necessary even though the actual language set is english for the chinese?
Title: Re: Chinese
Post by: Ivan Trebješanin on June 08, 2009, 17:05:22
Is this really necessary even though the actual language set is english for the chinese?
What do you mean "english for chinese" ???
Title: Re: Chinese
Post by: xmanhattan on June 08, 2009, 17:16:14
First, you were right about the charset being zn.  I just checked although there are three dialects for zn most are using just zn.

As we have Home, Αρχη, and 主页 that link to the frontpage and are also linked by the flags, when I click on the chinese one, it is showing me the english menus that I have.  I have setup a test content item with frontpage but that is not being displayed.

I also checked the frontpage module to make sure that the language setting was all languages.

The flag link shows
Code: [Select]
index.php?mylang=chinese so this is correct but when I place the mouse over the Home link that is displayed, it shows the same id as the english one rather than displaying the chinese characters above.

Title: Re: Chinese
Post by: kebic on June 08, 2009, 17:17:38
Add a similar line in .htaccess if using seopro.  ::)


RewriteRule ^(zn)/(.*)$ /index.php?mylang=chinese [QSA,L]
Title: Re: Chinese
Post by: xmanhattan on June 08, 2009, 19:55:41
Thanks Kebic but I'm still trying to figure out the menu problem.
Title: Re: Chinese
Post by: xmanhattan on June 12, 2009, 17:02:42
Just found my mistake.

There are two language directories:
/administrator/language              the backend language area, I believe
and
/language                                  the frontend language area.

Now the Chinese flag works properly using the english language files.

Now all I have to do is to convince them to do the translations one day!