In Switzerland, maternity insurance is required by law: this means that working mothers are granted leave for 14 weeks after giving birth and receive 80 percent of their average salary (also called maternity compensation or maternity leave).
Since 2021, there has been a legal entitlement to paternity leave in Switzerland. Officially, this amounts to 2 weeks. You can obtain more information about this directly from your employer or from here.
More information about the Maternity compensation and to the Protection of the employee during maternity can be found on the website of the Federal Social Insurance Office.