I have frequently considered taking a job in China that would last several years. If we had a child during our time there, would my wife automatically receive maternity leave, or does the government leave that decision to individual employers?
China's State Council has a Special Provisions on Labor Protection of Female Employees (text in Chinese):
According to the Special Provisions, female employees are now entitled to 98 days of maternity leave for childbirth, an increase of 8 days from the current 90. Among the 98 days, 15 may be taken before giving birth. In cases of dystocia (difficult delivery), the maternity leave will be extended by 15 days; in cases of multiple births, the maternity leave will be extended by 15 days for each additional newborn.
Source: The US Law Library of Congress
To add to the response above, paid maternity leave is mandated by the government, but its worthwhile to consider how a mainland employer would treat your wife all the same. During an interview, for instance, an employer would not be penalized if they denied your wife employment explicitly because she might have a child. My advice would be to seek a foreign multinational or school which, because of international business norms, would actively try to prevent sexism in during hiring and thereafter.