WP2.6 word count malfunctioning in Chinese (8 posts)

  1. peterwongpp
    Posted 8 years ago #

    I was upgraded to 2.6 recently. But I immediately found that the new feature 'word count' worked incorrectly.

    It works perfectly in English. But it counts a paragragh of Chinese words as 1 instead of a Chinese word as 1. For example, the following words quoted shoule be 13 words, but the 'word count' counts it only two words.



    Do anyone have this problem like me? And do anyone know how to solve this problem?

    Thanks for answering.

  2. peterwongpp
    Posted 8 years ago #

    Also the Version Comparing malfunctioned like Word Count. It counts a paragragh of Chinese Words as one word.

  3. Andrew Ozz
    WordPress Dev
    Posted 8 years ago #

    Unfortunately, I think only a Chinese speaking developer would be able to fix that...

  4. peterwongpp
    Posted 8 years ago #

    Are there any resources about how word count works or where are those source codes for the function? I would like to take a look at the source code to see if I make any improvements for it.

  5. rawalex
    Posted 8 years ago #

    peterwongpp, I am not sure how wordpress counts them exactly, but the standard for counting "words" in english is every 5 characters is a word, plus or minus. Some people do it by counting a solid grouping as a single word, which may be more what wordpress is doing here.

  6. Andrew Ozz
    WordPress Dev
    Posted 8 years ago #

    Sure, the code is in wp-admin/js/word-count.js and on trac here:

    However as rawalex mentions, there are different standards for different languages. Also the script should be very fast, shouldn't interfere with the user typing a long post even on a slower computer.

  7. TTK
    Posted 8 years ago #

    Is there anyway to turn this feature COMPLETELY OFF?!

  8. Nikolay Bachiyski
    Key Master
    Posted 8 years ago #

    There is a plugin, which counts thw words properly in Chinese:


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.