fbpx

Case Study: Problems With Chinese Excerpts

I was working on a client site which was built with English and Chinese languages.  The theme they were using showed excerpts of larger blog posts on the home page, it was working fine in English but when we switched over to Chinese we were getting issues.

The Chinese version of the site, instead of showing a Chinese excerpt was showing all of the Chinese content, this is not what we wanted.

What Is An Excerpt

An excerpt is a cut down teaser of your full content, it is often used in a list of content to show what is available on your website.

A site visitor can scan the excerpt and then choose if it is of interest then click through to read the full content.  Instead of filling your homepage with huge blocks of content you can show more digestible chunks.

Why Chinese Excerpts Don’t Work Too Well

The problem is the way WordPress, the software I was using for this build, creates excerpts.  It looks for the first X words and then cuts off the content and creates an excerpt.  By default this is 55 words.

Why is this a problem? WordPress looks for spaces, and often there are very few spaces in Chinese text, so the software does not know how to calculate a word and huge chunks of text are returned.

The Solution

The solution was to count characters rather than words to make an excerpt.

This could be custom coded, but luckily there are plugins out there that can do this for us.

The one I eventually went with was Advanced Excerpt, this allow us to set a character count rather than a word count.

https://wordpress.org/plugins/advanced-excerpt/

Here is a screen dump of the settings page we get with Advanced Excerpt.

Click to see full size image

Another very useful function of this plugin is that we can tell it to count character then find the end of the next word which stops the English excerpt begin cut off mid wor… (only joking word of course :)).

Another option that seemed to work (but I struggled to read the Chinese documentation) was this one.

https://wordpress.org/plugins/wp-chinese-excerpt/

Wrap Up

This was a brand new situation to me, and just goes to show that we often take the way languages work for granted.

What works on your website with your native language may not always work when you add an additional language.  The challenges of building multi language websites are not always clear cut.

If you need help with some odd issue on your multi language site like this please contact us for a quote.

Leave a Reply

Your email address will not be published. Required fields are marked *