optimize background.setLang method