By request, here’s the pattern.

Pay particular attention to the cases of wàn (萬 / 万) and yì (億 / 亿). When the numbers quantifying those are greater than ten, wàn and yì are written separately.

8 | bā |

58 | wǔshíbā |

658 | liùbǎi wǔshíbā |

5,658 | wǔqiān liùbǎi wǔshíbā |

35,658 | sānwàn wǔqiān liùbǎi wǔshíbā |

435,658 | sìshísān wàn wǔqiān liùbǎi wǔshíbā |

9,435,658 | jiǔbǎi sìshísān wàn wǔqiān liùbǎi wǔshíbā |

79,435,658 | qīqiān jiǔbǎi sìshísān wàn wǔqiān liùbǎi wǔshíbā |

379,435,658 | sānyì qīqiān jiǔbǎi sìshísān wàn wǔqiān liùbǎi wǔshíbā |

6,379,435,658 | liùshísān yì qīqiān jiǔbǎi sìshísān wàn wǔqiān liùbǎi wǔshíbā |

Still higher units follow the pattern of wàn and yì.

Note: When líng (zero) is a medial, it is always written separately.

507 | wǔbǎi líng qī | 五百零七 |

40,507 | sìwàn líng wǔbǎi líng qī | 四萬零五百零七 |

Very helpful.

Just to be sure, is the following correct (regarding the separation of “wa?n”)?

1010000 – y?ba?i líng y? wa?n

1100000 – y?ba?i y?shí wa?n

100010000 – y?yì líng y? wa?n

100100000 – y?yì líng y?shí wa?n

Thanks.

y?ba?i líng y? wa?n –> y?ba?i líng y?wa?n

y?ba?i y?shí wa?n (OK)

y?yì líng y? wa?n –> y?yì líng y?wa?n

y?yì líng y?shí wa?n (OK)

Thanks a lot. Turned out that these rules are not the easiest things to code. But here’s a try:

http://www.lesantoso.com/tools/indonesian-numbers/

(The page is on spelling numbers in some languages spoken in Indonesia, including Mandarin).

Pingback: Pinyin news » How to write numbers and measure words in Hanyu Pinyin

Pingback: Google Translate’s Pinyin converter: now with apostrophes | Pinyin News

Pingback: Google Translate’s Pinyin converter revisited | Pinyin News