Belgium became independent from the Netherlands in 1830 ; it was occupied by Germany during World Wars I and II .