Update setlanguage function