Why do some countries mandate a long maternity leave, while others mandate only a short one?We incorporate into a standard mandated-benefit model social tolerance of gender-based discrimination, showing that the optimal length of maternity leave depends on it. The less tolerant a society is of gender-based discrimination, the longer the maternity leave it will mandate. Relying on recent research in psychology and linguistics according to which patterns in languages offer a window into their speakers' dispositions, we collected new data on the number of gender-differentiated personal pronouns across languages to capture societies' attitudes toward gender-based discrimination. We first confirm, using within-country language variation, that our linguistic measure is correlated with attitudes toward gender-based discrimination. Then, using cross-country data on length of maternity leave, while controlling for other parameters, we find a strong correlation between our language-based measure of attitudes and the length of maternity leave.