Modelling of Mg II lines in solar prominences