What are the exact rules for choosing between 二 and 两 for writing large numbers (larger than 11)? What I understood was:
- For things like serial numbers, codes, where the number is written or read using its digits without the words like 十，百，... always use 二 (and may use 幺 instead of 一)。
- At the last (units) place, always use 二. E.g. 342 是 三百四十二。
- Before 十 always use 二. E.g. 325 是 三二五。
- Before 百，千，万，亿 always use 两。 E.g. 2231 是 两千两百三十一。 So, 2222222 是 两百二十两万两千两百二十二, right?
The reason I started to doubt it is that both Deepl and Google Translate disagree with the last one translating 2231 as 两千二百三十一 (while 231 is still 两百三十一). One option to accommodate that is to change rule 3 to
3'. Before 百，千，万，亿 use 两 when it is the first digit of the number, otherwise use 二. E.g. 2231 是 两千二百三十一。
I'm not sure if that is the correct thing to do, though.
What are the correct rules then?
There are 2 similar questions, but the answer there address more broad rules for 二 vs 两 and do not appear to cover the rules for large numbers.