Need help for flashing frimware without effecting the bootloader !

Wait 5 sec.

so my mom's uncle's wife has a galaxy j5 .So i installed los18.1 but its the dumbest suggestion i pick to my self because when booting it success but it very lags.Now i have to return it to the original system .The phone has the latest bootloader version that can have.And i want the frimware that have arabic support So i picked XSG .Likely the phone missing the microphone and it's only for youtube , whatsapp and browsing.please Can anyone help me.