While you are not legally obliged to tell them until 10 weeks before you plan on taking leave, it would probably be the best way to start your working relationship by being upfront.

If all goes well then perhaps they will be happy to have you back once your maternity leave is over.