Hippo CTO blog - Arjé Cahn

Got Chinese?

So,

Does Hippo CMS (and as a consequence, Apache Cocoon) support the Chinese character set?

Here's part of the answer:
heading.JPG

Continue reading to see how I set it up within 10 minutes.

Yes, we got Chinese

In short, the answer to the question above is yes, Hippo CMS supports Chinese and plenty of other not-so-Western character sets (maybe all of them, but I haven't had the change to check them all..). And it does so right out of the box.

Since the proof is in the pudding, here's how I checked it. Just follow my steps and you'll be editing Chinese in no time! I'm using Apache Cocoon for this demo, which is of course doing an excellent job at handling foreign charactersets, but it should work in any JSF/JSP/Java etc environment (Wander, you might want to check this?).

I downloaded the latest demo distributions (hippo-cms-v6.03.06.zip, hippo-cms-site-sample-v1.02.00.zip and hippo-repository-1.2.10.zip), from the HippoCMS.org download page and unpacked them in a temporary folder. Also, I downloaded the Apache Cocoon 2.1.10 sources, compiled them, and mounted the simple site sample into the Cocoon mount table as described on the 'Simple Site Sample' page.

That all done, I started up the Hippo Repository instance, waited for it to say 'Fortress started', then fired up the Hippo CMS and ran Cocoon with 'cocoon servlet'.

This whole process (including the downloading) took me about 10 minutes, and I even managed to type this bit of text in that time period ;). Compiling Cocoon took me the longest, about 4 minutes, but that was all. No spooky things here.

If you don't like compiling Cocoon (or compiling anything at all), just take the Hippo Repository and CMS distros. You'll be able to at least *edit* some Chinese; no site to display it on, but it gives you the quick option of messing around with the bare Hippo CMS functionalities.

Then there was the issue of finding some Chinese text that I could use. Luckily, there's the excellent Lorem Ipsum Generator that renders both Chinese and Japanese mock-up texts. Just to be sure that I wouldn't offend anyone, I ran the generated Chinese text through Altavista's Babelfish that translated it into English. However, the resulting bit of text is complete nonsense:

Standard Guizhou and the Minnan dialect already formed north the modern northern Mandarin dialect embryonic form the dialect to contain the compound word Japanese in fact which the massive homophones as well as ....

So I'm still uncertain whether this is actual mock text or a highly insulting bit of Chinese swearing. I have no way of testing it, so I apologize up front if anyone gets seriously offended by my text. Sorry!

  1. This is what the simple site demo looks like right after you've started up Cocoon and the Hippo Repository. Not very exciting, it simply renders the usual "Foo Bar" thingamagic.

    demo-site-before-small.JPG

  2. The Hippo CMS distribution displays only 3 documents: Bar, Foo and Test. I'll be editing the "Foo" document.

    Hippo-cms-interface-small.JPG

  3. Here's the Foo document, as it comes right out of the box (i.e. the default Repository installation). As you can see, there are only two fields in this template: title and body. This is of course by no means a realistic example of a template, since most templates will contain anywhere from 5 to 50 different fields. But for a demo, this is just fine. I'll be entering a bit of Chinese in both the title field (which is a regular textbox) and the body field (which is a Xinha instance).

    foo-edit-before-small.JPG

  4. I copied my bit of Chinese Lorem Ipsum from www.lorem-ipsum.info, pasted it into my Foo document, and hit the 'save' button:

    foo-edit-after-small.JPG

  5. And, finally, after refreshing the demo webpage, I can marvel at the wonders of a Chinese characterset:

    demo-site-after-small.JPG

I hope this answers some questions! :-)

-- Arjé





Post a comment

Verification (needed to reduce spam):