Welcome to Geeklog, Anonymous Friday, June 21 2024 @ 11:12 pm EDT

Geeklog Forums

Word Count error in Chinese


Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
Someone asked me to setup a Chinese site and the word counts are wrong. It seems that the whole sentence is counted as one, so it shows only 3 words, while there were actually a whole page more.

One option is for me to remove the word count function after the Read More link in lib-common.php. But I just want to post it here to find out if there is any way to fix it to count it right?

Sam
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The word count is rather primitive:
Text Formatted Code
$numwords = sizeof( explode( ' ', $A['bodytext'] ));
 
i.e. it considers everything that's separated by a space to be a word.

I have no idea what the convention for Chinese would be ...

bye, Dirk
 Quote

All times are EDT. The time is now 11:12 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content