WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. peterwongpp
    Member
    Posted 6 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
    Member
    Posted 6 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 6 years ago #

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

  4. peterwongpp
    Member
    Posted 6 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
    Member
    Posted 6 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 6 years ago #

    Sure, the code is in wp-admin/js/word-count.js and on trac here:
    http://trac.wordpress.org/browser/trunk/wp-admin/js/word-count.js

    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_2k
    Member
    Posted 6 years ago #

    Is there anyway to turn this feature COMPLETELY OFF?!

  8. Nikolay Bachiyski
    Key Master
    Posted 6 years ago #

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

    http://www.charlestang.cn/chinese-wordcount.htm

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.